Page 1 of 1

Datastage job Status Code=2

Posted: Mon Mar 24, 2014 2:39 am
by moalik
Hi,

i am using the dsjob command to run my job as below:

dsjob -run -jobstatus projectname jobname

When ever my job completes with warnings, i am getting the status code =2 and when ever it fails with Fatal Errors, i am getting the status code=2.

According to IBM documentation, i should get status_code=3 when Job finished a normal run with a fatal error.

Is there a way to achieve this?

Thanks,
Mohsin Khan

Posted: Mon Mar 24, 2014 3:21 am
by dsetlteam
In case of fatal errors, the status code is 3 which is correct.

Check in the datastage job log if there are really any fatal errors.
Also, run the dsjob command directly on the server and then use "echo $?" to check for exact status code.

Posted: Mon Mar 24, 2014 3:33 am
by moalik
Yes there are Fatal Error in the datastage log but i am getting the status code as 2.

I ran the command directly on the server and the status is again 2 for Fatal Errors.

Posted: Mon Mar 24, 2014 7:19 am
by chulett
As noted, you should be getting a "3" for Fatal... if you are not, contact your official support provider.

Posted: Mon Mar 24, 2014 1:44 pm
by ray.wurlod
With parallel jobs not all "Fatal" errors are fatal (cause abort). You can get red icons in the log but the job status is "Finished (see log)". I don't agree with that, but it does sometimes occur.

Posted: Mon Mar 24, 2014 2:44 pm
by chulett
Sorry, I missed the distinction that Ray picked up on. I meant if your job actually fails, not simply if it has fatal errors in the log. You'd think one would lead to the other but as noted that's not always the case for some reason.

Posted: Tue Mar 25, 2014 1:06 am
by moalik
Hi Ray,

Actually i created the test job, in the output sequential file, i have given the path name incorrectly where the file gets created. SO my job aborted with errors and there are Fatal Errors:
Example:
seq_output,0: Unable to open XXX/XXX/XXX.txt: No such file or directory.
buffer(0),1: Fatal Error: APT_BufferOperator::writeAllData() write failed.

This gives me the jobstatus of :2 in stead of 3.

Posted: Tue Mar 25, 2014 4:35 am
by priyadarshikunal
And they say this issue was fixed in 9.1 and is there in 9.1 fix list here as JR41781

Are you on 9.1 or 9.1.2?

Posted: Tue Mar 25, 2014 7:49 am
by chulett
Please be more precise - we know you have fatal errors in the log but what's important to note here is the actual status of the job shown in the Director. Ray has already noted that the job may still end up in a "Finished (see log)" status rather than "Aborted" in that case.

Also note that the fix posted in this particular case is to no longer consider that problem "fatal" but rather simply a warning. So the ending job status is actually correct! :wink: