Page 1 of 1

how to callback to DS to get its Recent job ouput

Posted: Wed Jun 13, 2012 9:46 am
by WBlaustein
Hello Everyone,
I have a scenario, whenever my job finishes it execution it has to output its Log (with any warning or Errors exitsts in that job). How to achieve this?

Posted: Wed Jun 13, 2012 4:29 pm
by ray.wurlod
After job subroutine would be my preferred mechanism. That way you can use DSJ.ME as the job handle. The only downside is you have to fake the "job finished" message based on DSJ.JOBINTERIMSTATUS.

Posted: Thu Jun 14, 2012 10:22 am
by WBlaustein
Can you Explain me in more Details!!!
How to call that DSJ.ME function in After/Before Job Rioutines, i didn't seen those king of routines in that drop down list.

Posted: Thu Jun 14, 2012 4:18 pm
by ray.wurlod
DSJ.ME is a DataStage constant that you would use in the routine code itself, for example in calls to functions such as DSGetJobInfo().

You will need to create and compile the routine - it's not there by default. Create a new server routine and make its type "before/after subroutine".

Posted: Thu Jun 14, 2012 4:55 pm
by chulett
And you'll need to leverage the various "DSGet" functions, depending on exactly what you need to do. Speaking of which, can you expand a teeny bit on what "output its log" means? For example - outputs in what format, to where? To what purpose?

Posted: Fri Jun 15, 2012 9:32 am
by WBlaustein
Standard output ( eigther in a text file or in command line) purpose is to When ever a job successfully completed we need to store those logs in Tivoli Scheduler Repository for the associated job.