Executing Before Job Routine From Job Control Code

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
ecwolf
Charter Member
Charter Member
Posts: 3
Joined: Thu Jun 17, 2004 8:44 am
Location: Edmonton, Alberta, Canada

Executing Before Job Routine From Job Control Code

Post by ecwolf »

Good Day,

I have a question regarding before-job routines....

I have created a before-job routine called "MyRoutine" which is running fine. I also have a Server Job where I have written some job control code. Within this job control code I would like to call the routine "MyRoutine". Is there any way to utilize "MyRoutine" within the scope of a server job's job control code? Within the documentation, I have seen an example where a second before-job routine calls the first before-job routine. However, I would think that would be different than calling the routine from a server job's job control code. Am I wrong?

After, looking at the documentation and this forum, it looks like what I am looking to do is not possible......

I tried using the following statement, but it is failing:
ErrorCode = Subr("DSU.MyRoutine","MyArg",ErrorCode)

Any advice or suggestions would be greatly appreciated... My apologies if this issue has already been addressed.

Thanks,
ecwolf
Sainath.Srinivasan
Participant
Posts: 3337
Joined: Mon Jan 17, 2005 4:49 am
Location: United Kingdom

Post by Sainath.Srinivasan »

You can call your routine as a normal function. But you need to define it using 'deffun'.

Search for 'deffun'.
Post Reply