Page 1 of 1

Command line Job Status Options?

Posted: Wed Dec 15, 2004 2:23 pm
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.

Posted: Wed Dec 15, 2004 3:04 pm
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,

Posted: Wed Dec 15, 2004 3:12 pm
by ray.wurlod
Try the -jobstatus option on dsjob -run to get a more reliable reporting of status on exit.

Posted: Wed Dec 15, 2004 3:24 pm
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.

Posted: Wed Dec 15, 2004 7:25 pm
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.