i have a requirement to write a routine in c language , i.e a datastage API program ,to get the values of DSGetJobInfo, DSGetStageInfo and put it in a seq file.
Ihave done this in a server routine. But there is a prob with that.
Now i want to do the same in Parellel routine.
can any one pls give the code for the following server Routine in C language.
Code: Select all
$INCLUDE DSINCLUDE JOBCONTROL.H
ErrorCode = 0
DirName = Field(InputArg,';',1)
JobName = Field(InputArg,';',2)
ProjName = DSGetProjectInfo(DSJ.PROJECTNAME)
JobHandle = DSAttachJob(JobName, DSJ.ERRWARN)
JobFile = JobName:"_job.txt"
JobStart = DSGetJobInfo (JobHandle, DSJ.JOBSTARTTIMESTAMP)
JobRow = ProjName:",":JobName
Openpath DirName to jobfile then
write JobRow to jobfile, JobFile else
call DSLogWarn("Failed to write file ":JobFile:" to directory ":DirName, "DoJobReport")
end
end
else
call DSLogWarn("Failed to open directory ":DirName, "LOG_DETAILS")
end
close jobfile
Thanks much in advance.
Rajan.