Dear all,
We are using Unix Shell Scripts as the Wrapper for all our parallel jobs (around 20-25 jobs). Once we trigger the script, when the load is too heavy, it takes around 3 hours for the entire process to finish. We have observed that in such scenarios, after about 2 hours, even though the job that is currently running is successful, the return code is not being received by the Unix session, and as a result it is not kicking off the next job in the Sequence. Is it because of any UNIX session time-out issue?
Pls. let me know.
DataStage not returning the return code to Unix
Moderators: chulett, rschirm, roy
-
- Premium Member
- Posts: 892
- Joined: Thu Oct 16, 2003 5:18 am
HI Aparna,
We had a similar problem of unix box not returning the return code to datastage sequencers. But we could not diagnose whether really the Unix OS was not sending the message or Datastage Sequencers were not able to read it.
We made a trick in the unix script. We kept is send return codes at a periodic intervals. This worked
Regards
Sreeni
We had a similar problem of unix box not returning the return code to datastage sequencers. But we could not diagnose whether really the Unix OS was not sending the message or Datastage Sequencers were not able to read it.
We made a trick in the unix script. We kept is send return codes at a periodic intervals. This worked
Regards
Sreeni
-
- Participant
- Posts: 9
- Joined: Mon Nov 28, 2005 2:30 pm
Here's how: from a Unix script call the following function
function GiveDStgjobstatus {
typeset exitcode
# invalid number of arguments given
exitcode=99
if [ $# -eq 1 ]
then
case "$1" in
1)
exitcode=0
;;
*)
exitcode=1
;;
esac
fi
if [ $# -eq 2 ]
then
case "$2" in
0)
case "$1" in
1)
exitcode=0
;;
*)
exitcode=1
;;
esac
;;
1)
case "$1" in
1)
exitcode=0
;;
2)
exitcode=0
;;
*)
exitcode=1
;;
esac
;;
*)
# invalid argument option -- should be 1 for yes and 0 for no
exitcode=98
;;
esac
fi
return $exitcode
}
Put the following at the end of your unix script calling your Dtage job
GiveDStgjobstatus $?
exitvalue=$?
exit $exitvalue
typeset exitcode
# invalid number of arguments given
exitcode=99
if [ $# -eq 1 ]
then
case "$1" in
1)
exitcode=0
;;
*)
exitcode=1
;;
esac
fi
if [ $# -eq 2 ]
then
case "$2" in
0)
case "$1" in
1)
exitcode=0
;;
*)
exitcode=1
;;
esac
;;
1)
case "$1" in
1)
exitcode=0
;;
2)
exitcode=0
;;
*)
exitcode=1
;;
esac
;;
*)
# invalid argument option -- should be 1 for yes and 0 for no
exitcode=98
;;
esac
fi
return $exitcode
}
Put the following at the end of your unix script calling your Dtage job
GiveDStgjobstatus $?
exitvalue=$?
exit $exitvalue
Kanem