dsjob question

A forum for discussing DataStage<sup>®</sup> basics. If you're not sure where your question goes, start here.

Moderators: chulett, rschirm, roy

Post Reply
krisp321
Participant
Posts: 39
Joined: Thu Mar 04, 2010 12:39 am

dsjob question

Post by krisp321 »

Hi
I want to trigger mail using UNIX shell script by getting the job status of datastage job using dsjob command.

I tried to get jobstatus as soon as job execution is completed.

Here is what I am doing in shell..
executing job using dsjob command and in next step
i am trying to find the status of job using -jobstatus of dsjob

Here is what I observed
I am getting correct jobstatus only after few seconds of completion of Job when I see that updation in datastage Director. May be after 10 secs)
But immediately after completing the job execution, I am still getting prev. execution status of job. only if i try to find jobstatus when it get updated in director i get the correct status using dsjob.

My question is, can I get jobstatus correctly as soon as execution is completed and how. Thanks. Any help is really appreciated.
chulett
Charter Member
Charter Member
Posts: 43085
Joined: Tue Nov 12, 2002 4:34 pm
Location: Denver, CO

Post by chulett »

No need for the second step, use the -jobstatus option of dsjob, it will wait until complete and then the return status will be of the job: 1,2,3, etc.
-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 »

Note that options -wait and -jobstatus are mutually exclusive. If you use -wait you will need to remove it to use -jobstatus option.
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