Command line Job Status Options?

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
gdheatley
Participant
Posts: 10
Joined: Mon Aug 11, 2003 2:52 pm

Command line Job Status Options?

Post by gdheatley »

What is the best method of getting the job status for a specific job once ran?

We are executing the job using dsjob from within a script file.

We have been told that the return code from the dsjob is not always accurate as to whether the job completed successfully or not.

To explicitly get the job status we query the job once run (dsjob -run -wait) to get its status. We use dsjob -jobinfo and parse the verbose results (multiple lines) and extract the job status, e.g., RUN OK, RUN FAILURE, etc.

We are upgrading to version 7.5 and wonder whether this is still the best way?

Best practices would be appreciated.
roy
Participant
Posts: 2598
Joined: Wed Jul 30, 2003 2:05 am
Location: Israel

Post by roy »

Hi,
A simple check with the release notes for new things on this subject should lead you to the answer (IMHO)

if it worked so far and no new things are found regarding this in the release notes you should be ok.
(I say this since as some of us remember in version 5 the crashed status was entroduced, come to think of it can't remember if it still applies :roll: ?)

IHTH,
Roy R.
Time is money but when you don't have money time is all you can afford.

Search before posting:)

Join the DataStagers team effort at:
http://www.worldcommunitygrid.org
Image
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Post by ray.wurlod »

Try the -jobstatus option on dsjob -run to get a more reliable reporting of status on exit.
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
gdheatley
Participant
Posts: 10
Joined: Mon Aug 11, 2003 2:52 pm

Post by gdheatley »

ray.wurlod wrote:Try the -jobstatus option on dsjob -run to get a more reliable reporting of status on exit.
Would this be "the best practice approach" to take then Ray rather than explicitly querying the job ? Have you ever seen any circumstances where the two have differed? Only ask as it was an Ascential Consultant that made the original recommendation.

Also is there a way to just get the actual numeric return code, instead of the verbose message which one would have to parse?

Thanks.
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Post by ray.wurlod »

I recall reading (in one of the readme files?) that dsjob has been changed so that it can now return the exit status of the job itself.

Alas I can't recall the details just now.
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