Datastage job Status Code=2

A forum for discussing DataStage<sup>®</sup> basics. If you're not sure where your question goes, start here.

Moderators: chulett, rschirm, roy

Post Reply
moalik
Participant
Posts: 39
Joined: Thu Sep 15, 2011 8:15 am
Location: Melbourne

Datastage job Status Code=2

Post 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
dsetlteam
Premium Member
Premium Member
Posts: 35
Joined: Mon Feb 10, 2014 10:14 pm
Location: USA

Post 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.
moalik
Participant
Posts: 39
Joined: Thu Sep 15, 2011 8:15 am
Location: Melbourne

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

Post by chulett »

As noted, you should be getting a "3" for Fatal... if you are not, contact your official support provider.
-craig

"You can never have too many knives" -- Logan Nine Fingers
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Post 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.
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
chulett
Charter Member
Charter Member
Posts: 43085
Joined: Tue Nov 12, 2002 4:34 pm
Location: Denver, CO

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

"You can never have too many knives" -- Logan Nine Fingers
moalik
Participant
Posts: 39
Joined: Thu Sep 15, 2011 8:15 am
Location: Melbourne

Post 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.
Mohsin Khan
Datastage Consultant
priyadarshikunal
Premium Member
Premium Member
Posts: 1735
Joined: Thu Mar 01, 2007 5:44 am
Location: Troy, MI

Post 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?
Priyadarshi Kunal

Genius may have its limitations, but stupidity is not thus handicapped. :wink:
chulett
Charter Member
Charter Member
Posts: 43085
Joined: Tue Nov 12, 2002 4:34 pm
Location: Denver, CO

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

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