Previous instance status

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
ag_ram
Premium Member
Premium Member
Posts: 524
Joined: Wed Feb 28, 2007 3:51 am

Previous instance status

Post by ag_ram »

Hi

I want to get the status of previous instance sequencer. If it is success then i need to trigger another instance of sequencer otherwise I should not trigger.

I need to do this logic in shell script.

can anyone help me which API I need to use to find the status of sequencer?

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

Post by chulett »

Just the normal 'dsjob' command with '-jobinfo'. A Sequence (no 'r') job is just another job so no need to treat it any differently.
-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 »

Sequencers don't have instances. I will assume, therefore, that you mean "job sequences". A job sequences is just a regular job, therefore dsjob with the -jobinfo option, executed before a run request is issued, will return the previous status.
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
ag_ram
Premium Member
Premium Member
Posts: 524
Joined: Wed Feb 28, 2007 3:51 am

Post by ag_ram »

Thanks.

As per the document, it says this command will wait until the sequencer finishes its task and then it returns the exit code. But I want the status of the job immediately so that I will check the status; if it is running I will wait for 1 more minute by sleeping and check status, otherwise I will execute the dsjob. As the shell script is called from external application for every 5 minutes.

Issue: If dsjob -jobstatus waits for 5 or more min to give exit code, the scheduler (External app) will trigger again shell script. It might create mess..Any other way for it?
chulett
Charter Member
Charter Member
Posts: 43085
Joined: Tue Nov 12, 2002 4:34 pm
Location: Denver, CO

Post by chulett »

:? You've misread both posts, it seems. Not -jobstatus (something completely different) but rather -jobinfo is what you need to use.
-craig

"You can never have too many knives" -- Logan Nine Fingers
ag_ram
Premium Member
Premium Member
Posts: 524
Joined: Wed Feb 28, 2007 3:51 am

Post by ag_ram »

Thanks...You are right. Its working.
Post Reply