Page 1 of 1

Req for list of possible values and descrip for Job codes

Posted: Fri Nov 26, 2004 3:38 am
by Ananda
Hi All,

I am running a shell script to run the DataStage jobs. My jobs are failing and returning Datastage Job status codes as 255,121,141.

I have this list of possible values for jobstatus. Can anyone add more values of Job Status codes alongwith their description.

Equ DSJS.RUNNING To 0 ;* This is the only status that means the job is actually running

Equ DSJS.RUNOK To 1 ;* Job finished a normal run with no warnings

Equ DSJS.RUNWARN To 2 ;* Job finished a normal run with warnings

Equ DSJS.RUNFAILED To 3 ;* Job finished a normal run with a fatal error

Equ DSJS.VALOK To 11 ;* Job finished a validation run with no warnings

Equ DSJS.RUNOK To 1 ;* Job finished a normal run with no warnings

Equ DSJS.RUNWARN To 2 ;* Job finished a normal run with warnings

Equ DSJS.RUNFAILED To 3 ;* Job finished a normal run with a fatal error

Equ DSJS.VALOK To 11 ;* Job finished a validation run with no warnings

Equ DSJS.VALWARN To 12 ;* Job finished a validation run with warnings

Equ DSJS.VALFAILED To 13 ;* Job failed a validation run

Equ DSJS.RESET To 21 ;* Job finished a reset run

Equ DSJS.CRASHED To 96 ;* Job has crashed

Equ DSJS.STOPPED To 97 ;* Job was stopped by operator intervention (can't tell run type)

Equ DSJS.NOTRUNNABLE To 98 ;* Job has not been compiled

Equ DSJS.NOTRUNNING To 99 ;* Any other status

I would be grateful if anyone can add more job status values to the above list alongwith their description.

Thanks and regards

Anand

Posted: Fri Nov 26, 2004 2:43 pm
by ray.wurlod
You have specified the complete list of server job exit codes, which can be found in DSINCLUDE/JOBCONTROL.H in your project directory.

At the moment I do not have access to a machine with Parallel Extender installed, so can only suggest that you check header files in DSINCLUDE and, possibly, the Parallel Job Developer's Guide (where you can find source code for the dsjob utility).

Posted: Mon Nov 29, 2004 11:12 pm
by T42
What you have pasted is also exactly how PX jobs will abort.

Can you please paste the log of those 'failure' messages you are observing, please?

Req for list of possible values and descrip for Job codes

Posted: Tue Nov 30, 2004 3:56 am
by PravinI
ray.wurlod wrote:You have specified the complete list of server job exit codes, which can be found in DSINCLUDE/JOBCONTROL.H in your project directory.

At the moment I do not have access to a machine with Parallel Extender installed, so can only suggest that you check header files in DSINCLUDE and, possibly, the Parallel Job Developer's Guide (where you can find source code for the dsjob utility).
Hi Ray,

I have confirmed this thing. JOBCONTROL.H enlists only the menitoned error codes. But then why do our jobs when run give error codes like 121,141,255 etc?

Regards,
Pravin

Posted: Tue Nov 30, 2004 3:14 pm
by ray.wurlod
I believe you are seeing exit status of dsjob, or exit status of osh (since you're running parallel jobs). The exit codes in JOBCONTROL.H were originally intended for server jobs.

There is an expanded list of error codes in chapter 57 of the Parallel Job Developer's Guide but it does not include the ones you mentioned.

There is also source code for dsjob in Appendix A the Server Job Developer's Guide (as an example of how to use the API).

To get the osh error codes, however, you would need to get your hands on some of the original Orchestrate documentation. I am unable to help there.

I'm similarly confused

Posted: Thu Jun 16, 2005 7:49 am
by StefL
I append this to this thread since I'm somewhat confused regarding these job codes myself.
I have a number of sequences that each run a job and then have an After Job Sequence that logs and reports status. I'm facing two sides of status code trouble in this situation.

First, I want to make sure the actual job that my sequence runs has run OK before I execute the After Job sequence; if it hasn't executed OK there is an Exception handler that runs instead.
Now, in the exit trigger of the Job Activity I'm faced with either setting the condition to 'Executed OK' or a customised condition where I've managed by 'trial and error' to conclude that 'ActivityName.$JobStatus=1' gives a similar result.
In my status report Email I also send the value of '#ActivityName.$JobStatus#', and it reports 1 when a successful run has occurred.
Second, the jobs are to be set into production using dsjob in some script. However, dsjob seems to report 0 as status code regardless if the -wait option is used or not. I seem to have read somewhere in the documentation that 0 is the API code saying that a job finished without error, although I wonder if this is really what dsjob is reporting since it reports 'Status code=0' before the job has actually finished. Is this a misunderstanding on my side - and can I tell the admins that set jobs into production that 1 is the return code to look for like I have done so far?

Posted: Thu Jun 16, 2005 8:29 am
by roy
Hi,
As you mentioned yourself there is a difference between internal codes to API codes.
I believe the 0 for successfull run in the API simply conforms to the unix standards for return value for successfull OS command execution.

Just to be on the safe side test the returned values for all cases that are of interest to you to get the exact string dsjob will return and work by it.

IHTH,

Re: I'm similarly confused

Posted: Thu Jun 16, 2005 9:04 am
by chulett
StefL wrote:However, dsjob seems to report 0 as status code regardless if the -wait option is used or not.
Use -jobstatus rather than -wait if you want the codes you've listed to be returned by dsjob.