Running and resetting jobs from within job control

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
SANOJ
Participant
Posts: 11
Joined: Mon Dec 01, 2003 9:14 am
Contact:

Running and resetting jobs from within job control

Post by SANOJ »

I created a job which purpose it is to call an underlying job n times (in a loop). I did this within the job control section of the job properties. This mechanism works fine, except if the underlying job aborts, because then the controlling job stops too.

Now I want to ensure that my controlling job calls the underlying job again (with different parameters)

I tried to use the RUNRESET instead of RUNNORMAL to call the underlying job, but then I got an errormessage stating that the underlying job had never been run.

So the question is : which statements should I include in the jobcontrol so that if the called job aborts, it can be called again (with different parameters) in the next iteration of the loop.
Wim

___________
"Carpe Diem"
chulett
Charter Member
Charter Member
Posts: 43085
Joined: Tue Nov 12, 2002 4:34 pm
Location: Denver, CO

Post by chulett »

You might want to post your code so you can get specific help. But, as a general comment, after you attach to the job you can call DSPrepareJob before you run it and that will reset the job if it needs it.
-craig

"You can never have too many knives" -- Logan Nine Fingers
kcbland
Participant
Posts: 5208
Joined: Wed Jan 15, 2003 8:56 am
Location: Lutz, FL
Contact:

Post by kcbland »

I would lay a bet on that the poster has not detached the current job handle and re-attached a new handle. You need a new handle for every run, and must detach the old if you want to RESET the job.
Kenneth Bland

Rank: Sempai
Belt: First degree black
Fight name: Captain Hook
Signature knockout: right upper cut followed by left hook
Signature submission: Crucifix combined with leg triangle
SANOJ
Participant
Posts: 11
Joined: Mon Dec 01, 2003 9:14 am
Contact:

Post by SANOJ »

Both suggestions worked. :D
Thanks!

Wim
Wim

___________
"Carpe Diem"
Post Reply