Regarding JOB CONTROL in dsjob -jobinfo command

Post questions here relative to DataStage Enterprise/PX Edition for such areas as Parallel job design, Parallel datasets, BuildOps, Wrappers, etc.

Moderators: chulett, rschirm, roy

Post Reply
199542
Participant
Posts: 41
Joined: Sat Dec 29, 2007 2:42 am

Regarding JOB CONTROL in dsjob -jobinfo command

Post by 199542 »

Hi Everybody ,
I am using IBM Information server 8.0.1 Version.I am a novice in datastage .I wrote a
shell script to invoke many jobs .I have the following scenario:
s1 --- sequence 1
j1 ---- parallel job 1

I want to run the sequence completely and then run the parallel job .This is the design which i should not change .When i run the sequence it wil produce some files which act as an input to the parallel job .

To accomplish the above task , I am using
dsjob -jobinfo project_name sequence_name .From this I am grepping the job control line and getting its value .I wrote the script in such a way that it will wait for the value of job control to became 0 and the it invoke the parallel job.

Just I want a suggestion from you people , whether this approach is correct or not ?
Also , Could you please suggest me a better method to check the completion of a datastage job ??
gikjpjj
ArndW
Participant
Posts: 16318
Joined: Tue Nov 16, 2004 9:08 am
Location: Germany
Contact:

Post by ArndW »

I you are starting this job yourself in the script, why not just add "-wait" to the dsjob command and avoid the loop?
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Post by ray.wurlod »

Even better, prefer -jobstatus to -wait so that you can determine the exit status of the job sequence without needing any further query.
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
199542
Participant
Posts: 41
Joined: Sat Dec 29, 2007 2:42 am

Post by 199542 »

Thank you Arndw and ray for your response .I will try that option and let you know the status
gikjpjj
chulett
Charter Member
Charter Member
Posts: 43085
Joined: Tue Nov 12, 2002 4:34 pm
Location: Denver, CO

Post by chulett »

I know you said the design 'should not change' but why not just put the PX job inside the Sequence job? :?
-craig

"You can never have too many knives" -- Logan Nine Fingers
199542
Participant
Posts: 41
Joined: Sat Dec 29, 2007 2:42 am

Post by 199542 »

Hi Everybody ,
My issue is resolved .I am using dsjob -wait option.Its working fine .Thank you chulett for your suggestion.Actually I mentioned just part of our design .If we take entire design into account , then we are unable to put that parallel job into the sequence .Thats why we are going with this option.
gikjpjj
199542
Participant
Posts: 41
Joined: Sat Dec 29, 2007 2:42 am

Post by 199542 »

Hi Everybody ,
Thank you all for your response .My issue is resolved .I am using dsjob -wait option.Its working fine .Thank you chulett for your suggestion.Actually I mentioned just part of our design .If we take entire design into account , then we are unable to put that parallel job into the sequence .Thats why we are going with this option.
gikjpjj
Post Reply