dsjob exits with unknown status code

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
pimmit22043
Participant
Posts: 38
Joined: Thu Jul 26, 2007 6:11 am

dsjob exits with unknown status code

Post by pimmit22043 »

Hi,

I have a sequencer that runs for 3 hrs and finishes successfully.
We use the command line to kick off the job

dsjob -run -jobstatus ${ParamList} ${ds_proj}

when it starts it prints

...Waiting for job

but when the sequencer is successful it returns the stutus code the job { $?} as 141 but I'm looking for a return code of 1 or 2 .

Did anybody come across the status code and what does it mean?
-RK
chulett
Charter Member
Charter Member
Posts: 43085
Joined: Tue Nov 12, 2002 4:34 pm
Location: Denver, CO

Post by chulett »

Yes, it has been seen before and discussed here. However, never did get an answer as to what it means and why it went away (for me) as quickly as it appeared...

viewtopic.php?t=106570&highlight=status+141
-craig

"You can never have too many knives" -- Logan Nine Fingers
Vinodanand
Premium Member
Premium Member
Posts: 112
Joined: Mon Jul 11, 2005 7:54 am

Post by Vinodanand »

Can you please check the timeout setting in the administrator. This issue normally pops up when the time out is set for say 1 hour and the job runs for more than the the timeout set .

Thanks,
Vinod
kumar_s
Charter Member
Charter Member
Posts: 5245
Joined: Thu Jun 16, 2005 11:00 pm

Post by kumar_s »

Does this happes for all the job in the Project or only for that particular job??
Impossible doesn't mean 'it is not possible' actually means... 'NOBODY HAS DONE IT SO FAR'
ds_is_fun
Premium Member
Premium Member
Posts: 194
Joined: Fri Jan 07, 2005 12:00 pm

Post by ds_is_fun »

The return value of a simple command is its exit status, or
128+n if the command is terminated by signal n. So your script was terminated by signal 13, which is SIGPIPE
(you look in /usr/include/sys/signal.h to find that out). If you are just looking for "unix exit status" then use $? which would either be 0(success) or 1 (failure)

If you are specifically looking to return the DS return status then you will need to do something like below-
cd $DSHOME/bin
JOB_STATUS_MSG1=`dsjob -jobinfo $PROJECT $DSJOB_CHKRUN | head -1 | cut -d"(" -f2 | cut -d")" -f1`
export JOB_STATUS_MSG1
echo "JOB_STATUS_MSG1= " $JOB_STATUS_MSG1

The return codes for DS are -
################################################################################
# Runnable Job Status (do something)
# 1 "Finished"
# 2 "Finished (see log)"
# 9 "Has been reset"
# 11 "Validated OK"
# 12 "Validated (see log)"
# 21 "Has been reset"
# 99 "Compiled"
################################################################################
1|2|7|9|11|12|21|99)
:
;;
################################################################################
# NOT Runnable Job Status (reset job)
# 0 "Running"
# 3 "Aborted"
# 8 "Failed validation"
# 13 "Failed validation"
# 96 "Aborted"
# 97 "Stopped"
# 98 "Not Compiled"
################################################################################
chulett
Charter Member
Charter Member
Posts: 43085
Joined: Tue Nov 12, 2002 4:34 pm
Location: Denver, CO

Post by chulett »

Vinodanand wrote:Can you please check the timeout setting in the administrator. This issue normally pops up when the time out is set for say 1 hour and the job runs for more than the the timeout set .
Don't think this has anything to do with timeouts - at least not in my experience. In my exposure to it, it was happening in two different installations where the timeout was disabled.
-craig

"You can never have too many knives" -- Logan Nine Fingers
chulett
Charter Member
Charter Member
Posts: 43085
Joined: Tue Nov 12, 2002 4:34 pm
Location: Denver, CO

Post by chulett »

ds_is_fun wrote:The return value of a simple command is its exit status, or 128+n if the command is terminated by signal n. So your script was terminated by signal 13, which is SIGPIPE.
Not sure there's anything simple about this, both times I presented it to IBM Support they couldn't tell me where it was coming from. It happened for a little while, then went away - never to be seen again.

We use a wrapper script using dsjob to launch our jobs from ^M with the -jobstatus option, it passes that back out as the exit status of the script itself. The jobs always completed successfully when we saw this, so the 'normal' exit status that would have been passed back should have been a 1. So you are saying that my jobs completed normally, passed back an exit status of '1' and then in that last moment the script itself got a SIGPIPE error? Don't really think so, not even sure what 'pipe' would be involved in something as simple as this. :?
-craig

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