Calling a DataStage Job from a 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
deep
Participant
Posts: 30
Joined: Fri Dec 12, 2003 9:06 am

Calling a DataStage Job from a Routine.

Post by deep »

Hi

I have written a routine to call a DataStage job using the regular
DSAttachJob and DSRunJob functions.

When i call this routine from the transfomer of my main Datastage job,
the Routine(and the job that is called from it) runs successfully the first time(i.e for the first row returned extracted from the DB of the main job) but it errors out the second time.The error i see in the job log of my main job is(**Unable to Attach to job**).I even tried resetting the job status each time i run it but still i get the same error.

I was wondering if any of you guys came across this problem??
I was also wondering if the idea of calling the Datastage Job from a Routine
in itself Wrong??

Thank You!
chulett
Charter Member
Charter Member
Posts: 43085
Joined: Tue Nov 12, 2002 4:34 pm
Location: Denver, CO

Post by chulett »

You have to 'detach' the job when you are done. Sounds like you are missing that step.
-craig

"You can never have too many knives" -- Logan Nine Fingers
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Post by ray.wurlod »

The advice about DSDetachJob is correct.

Do you really want to run this other job for every row you process in your main job? Is there a more efficient way that you could design this? (I suspect the answer to that is yes.)
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