Req for list of possible values and descrip for Job codes

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
Ananda
Participant
Posts: 29
Joined: Mon Sep 20, 2004 12:05 am

Req for list of possible values and descrip for Job codes

Post 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
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Post 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).
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
T42
Participant
Posts: 499
Joined: Thu Nov 11, 2004 6:45 pm

Post 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?
PravinI
Participant
Posts: 1
Joined: Mon Nov 29, 2004 6:13 am

Req for list of possible values and descrip for Job codes

Post 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
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Post 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.
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
StefL
Participant
Posts: 47
Joined: Fri Feb 25, 2005 3:55 am
Location: Stockholm
Contact:

I'm similarly confused

Post 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?
roy
Participant
Posts: 2598
Joined: Wed Jul 30, 2003 2:05 am
Location: Israel

Post 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,
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
chulett
Charter Member
Charter Member
Posts: 43085
Joined: Tue Nov 12, 2002 4:34 pm
Location: Denver, CO

Re: I'm similarly confused

Post 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.
-craig

"You can never have too many knives" -- Logan Nine Fingers
Post Reply