Before-job routine

Post questions here relative to DataStage Server Edition for such areas as Server job design, DS Basic, Routines, Job Sequences, etc.

Moderators: chulett, rschirm, roy

Post Reply
arun_im4u
Premium Member
Premium Member
Posts: 104
Joined: Mon Nov 08, 2004 8:42 am

Before-job routine

Post by arun_im4u »

Hi,

I have a before-job routine that has to execute another DataStage parallel job. If I define the routine as a transform function and test it works, but if I change it back to type before/after then it doesn't work. Can anyone please let me know what I am missing here..

Code: Select all


$INCLUDE DSINCLUDE JOBCONTROL.H

Equate Test to Arg1 * Arg1 has the name of the job I want to execute

JobHandle = ''

JobHandle = DSAttachJob(Test, DSJ.ERRNONE)
ErrCode1 = DSRunJob(JobHandle, DSJ.RUNNORMAL)


ErrorCode = 0  

Thanks
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Post by ray.wurlod »

What do you mean by "it doesn't work"?

What error messages (if any) are being logged? You need to provide more diagnostic information than "it doesn't work".

The variable Test is not being assigned a value - you will need to parse its value out of the InputArg argument.
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
arun_im4u
Premium Member
Premium Member
Posts: 104
Joined: Mon Nov 08, 2004 8:42 am

Post by arun_im4u »

Wat I mean by "it doesnt work?" is the job "Test" does not get executed, when this routine is called. I have this as a before-job routine in another job(Test2). So when I run Test2, I want job "Test" to be executed first before "Test2" starts. Evrytime I run Test2, the "Test" job does not run and just Test2 is being executed. The logs do not say anything about a before-job routine being executed or any problem with it.

I would like to know if there is any syntax error with the routine or can I add any other elements in the routine that would help me identify the issue.
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Post by ray.wurlod »

I identified your syntax error in my previous post on this thread.
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
Post Reply