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?
dsjob exits with unknown status code
Moderators: chulett, rschirm, roy
-
- Participant
- Posts: 38
- Joined: Thu Jul 26, 2007 6:11 am
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
viewtopic.php?t=106570&highlight=status+141
-craig
"You can never have too many knives" -- Logan Nine Fingers
"You can never have too many knives" -- Logan Nine Fingers
-
- Premium Member
- Posts: 112
- Joined: Mon Jul 11, 2005 7:54 am
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"
################################################################################
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"
################################################################################
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.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 .
-craig
"You can never have too many knives" -- Logan Nine Fingers
"You can never have too many knives" -- Logan Nine Fingers
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.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.
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.
![Confused :?](./images/smilies/icon_confused.gif)
-craig
"You can never have too many knives" -- Logan Nine Fingers
"You can never have too many knives" -- Logan Nine Fingers