DataStage job failed with return code : 269
Moderators: chulett, rschirm, roy
-
- Participant
- Posts: 42
- Joined: Mon Oct 15, 2007 10:35 pm
- Location: Charlotte
- Contact:
DataStage job failed with return code : 269
Hi ,
We are running the job from Autosys :
Job took almost 6hr 30 minis to complete.
Sequence , and the Jobs finished successfully but Autosys Job is aborted.
log is genereted as : dataStage job failed with return code : 269
Please Advice on this.
Thanks,
John
We are running the job from Autosys :
Job took almost 6hr 30 minis to complete.
Sequence , and the Jobs finished successfully but Autosys Job is aborted.
log is genereted as : dataStage job failed with return code : 269
Please Advice on this.
Thanks,
John
Re: DataStage job failed with return code : 269
Is it the Datastage job return code?
DS User
DS User
-
- Participant
- Posts: 54607
- Joined: Wed Oct 23, 2002 10:52 pm
- Location: Sydney, Australia
- Contact:
Check the script that Autosys runs to discover whether the exit status from dsjob is the exit status of that script and that the -jobstatus option is included in the dsjob command.
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
-
- Participant
- Posts: 42
- Joined: Mon Oct 15, 2007 10:35 pm
- Location: Charlotte
- Contact:
DataStage job failed with return code : 269
We are running the jobs from Autosys !!
All DataSage jobs completed successfully !
Log got generated with this message : DataStage job failed with return code : 269
Any info on this.
Thanks,
John
All DataSage jobs completed successfully !
Log got generated with this message : DataStage job failed with return code : 269
Any info on this.
Thanks,
John
Re: DataStage job failed with return code : 269
Ray answered your question.
DS User
DS User
-
- Participant
- Posts: 54607
- Joined: Wed Oct 23, 2002 10:52 pm
- Location: Sydney, Australia
- Contact:
No I didn't. I asked a question designed to find out where this code was generated. That question has not been answered. Ideally please post the wrapper script that AutoSys uses. Please also report whether by "log" you mean the DataStage job log or the AutoSys log.
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
-
- Participant
- Posts: 42
- Joined: Mon Oct 15, 2007 10:35 pm
- Location: Charlotte
- Contact:
DataStage job failed with return code : 269
ray.wurlod wrote:No I didn't. I asked a question designed to find out where this code was generated. That question has not been answered. Ideally please post the wrapper script that AutoSys uses. Please also repor ...
The log is not from the Datastage : The log is from the Autosys Log
Log : sec17a3_siebel_Activities_extract_seq_20111117.log
***************** Datastage Job Process Started 201111171039 **********************
Waiting for job...
201111180645 :: Data Stage Job sec17a3_siebel_Activities_extract_seq Process Completed .............
201111180645 :: Return Code from Data Stage Job = 269
201111180645 :: DataStage job failed with Return code : 269
Pleaes Advice.
Thanks,
John
-
- Participant
- Posts: 42
- Joined: Mon Oct 15, 2007 10:35 pm
- Location: Charlotte
- Contact:
DataStage job failed with return code : 269
Here is the Scripts which I'm using to run the jobs :
Please Advice me if there are any changes needed.
Please Advice me if there are any changes needed.
Code: Select all
#!/usr/bin/ksh
#########
# Define Parameters Files
#########
. /home/dsadm/.bash_profile
. /it/resrc_disk1/DS_OLTP_CRM/paramcd/OLTP_ds_ITenv_param.txt
# Define log file
SCRIPT_LOG=${LOG_DIR}/$(basename $0)_$(date +%Y%m%d).log
#echo "script directory :${SCRIPT_LOG}"
#########
# process input parametes
#########
while getopts j:R: param
do
case ${param} in
j) DSSEQNAME=${OPTARG} ;;
R) RESET=${OPTARG} ;;
\?) exit 1 ;;
esac
done
shift `expr ${OPTIND} - 1`
#########
# Check that required arguments are present
#########
echo "***************** Script Started $(date +"%Y%m%d%I%M") **********************" >>${SCRIPT_LOG}
if [ -z "${DSSEQNAME}" -a -z "${RESET}" ]
then
echo "$(date +"%Y%m%d%I%M") :: -j <job name> and -R <YES or NO> - DataStage job name is required to invoke script." >>${SCRIPT_LOG}
exit 1
fi
RESET1=$(echo ${RESET} | tr -s '[:lower:]' '[:upper:]')
echo " new test ":${RESET1}
$DSHOME/bin/dsjob -jobinfo $PROJECT ${DSSEQNAME}
jobreturncode=$?
#echo " ${DSSEQNAME} job return code :${jobreturncode}"
if [ ${jobreturncode} == 255 ]
then
echo " Failed to open Datastage job ${DSSEQNAME} in $PROJECT Project " >>${SCRIPT_LOG}
echo "***************** Script End $(date +"%Y%m%d%I%M") **********************" >>${SCRIPT_LOG}
exit 1
fi
$DSHOME/bin/dsjob -run -mode RESET ${PROJECT} ${DSSEQNAME}
L_DS_STATUS_CODE=$($DSHOME/bin/dsjob -jobinfo $PROJECT ${DSSEQNAME} | grep "^Job Status" | cut -f2 -d\( | cut -f1 -d\))>>${SCRIPT_LOG}
if [ "${L_DS_STATUS_CODE}" = '' ]
then
echo " $(date +"%Y%m%d%I%M"):: Invalid Datastage job name :${DSSEQNAME}">>${SCRIPT_LOG}
echo "***************** Script End $(date +"%Y%m%d%I%M") **********************" >>${SCRIPT_LOG}
exit 1
else
echo " $(date +"%Y%m%d%I%M"):: Datastage job ${DSSEQNAME} status :${L_DS_STATUS_CODE}">>${SCRIPT_LOG}
fi
#########
# Reset Datastage Job
#########
# Define Datastage log file
DS_LOG=${LOG_DIR}/${DSSEQNAME}_$(date +%Y%m%d).log
echo "***************** Datastage Job Process Started $(date +"%Y%m%d%I%M") **********************" >>${DS_LOG}
if [ ${RESET1} == "YES" ]
then
if [ ${L_DS_STATUS_CODE} == 21 ]
then
echo " $(date +"%Y%m%d%I%M"):: Datastage Job ${DSSEQNAME} is already reset status" >>${DS_LOG}
else
if [ ${L_DS_STATUS_CODE} == 3 -o ${L_DS_STATUS_CODE} == 96 -o ${L_DS_STATUS_CODE} == 97 -o ${L_DS_STATUS_CODE} == 98 -o ${L_DS_STATUS_CODE} == 99 ]
then
$DSHOME/bin/dsjob -run -mode RESET ${PROJECT} ${DSSEQNAME}>>${DS_LOG}
if [ $? -ne 0 ]
then
echo " $(date +"%Y%m%d%I%M") :: Failed to reset Datastage job ${DSSEQNAME}" >>${DS_LOG}
else
echo " $(date +"%Y%m%d%I%M"):: Success fully reset Datastage job ${DSSEQNAME}">>${DS_LOG}
fi
else
echo " $(date +"%Y%m%d%I%M"):: ${DSSEQNAME} job is in valid Status">>${DS_LOG}
fi
fi
else
echo " RESET is not required for this job"
fi
#########
# Run Datastage Job
#########
dsjob -run -wait -warn 1000000 -jobstatus ${PROJECT} ${DSSEQNAME}>>${DS_LOG}
#echo " $(date +"%Y%m%d%I%M") :: run command CMD = dsjob -run -wait -warn 1000000 -jobstatus ${PROJECT} ${DSSEQNAME}" >>${DS_LOG}
RETURNCODE=$?
echo " $(date +"%Y%m%d%I%M") :: Data Stage Job ${DSSEQNAME} Process Completed .............">>${DS_LOG}
echo " $(date +"%Y%m%d%I%M") :: Return Code from Data Stage Job = $RETURNCODE">>${DS_LOG}
if [ "$RETURNCODE" -eq 1 ]
then
#if the Datastage job return code is one, then the job finished .
echo " $(date +"%Y%m%d%I%M"):: DataStage job finished ">>${DS_LOG}
exit 0
elif [ "$RETURNCODE" -eq 2 ]
then
#if the Datastage job return code is two, then the job finished with warnings.
echo " $(date +"%Y%m%d%I%M"):: DataStage job finished with warnings">>${DS_LOG}
exit 0
elif [ "$RETURNCODE" -ne 1 ]
then
# if the Datastage job return code is not one or two, then set script return code to aborted
echo " $(date +"%Y%m%d%I%M") :: DataStage job failed with Return code : $RETURNCODE">>${DS_LOG}
exit 1
fi
echo "***************** Script Ended $(date +"%Y%m%d%I%M") **********************">>${SCRIPT_LOG}
echo "***************** Datastage Job Process Ended $(date +"%Y%m%d%I%M") **********************">>${DS_LOG}
###
#Remove Log files from log directory older than 30 days
###
find ${LOG_DIR} -name "*$(basename $0)*" -mtime +30 -exec rm -f {} \;>>${SCRIPT_LOG}
find ${LOG_DIR} -name "*${DSSEQNAME}*" -mtime +30 -exec rm -f {} \;>>${SCRIPT_LOG}
-
- Participant
- Posts: 54607
- Joined: Wed Oct 23, 2002 10:52 pm
- Location: Sydney, Australia
- Contact:
-
- Participant
- Posts: 42
- Joined: Mon Oct 15, 2007 10:35 pm
- Location: Charlotte
- Contact:
DataStage job failed with return code : 269
ray.wurlod wrote:Options -wait and -jobstatus are mutually antagonistic. Try removing the -wait option from the dsjob command, ...
Will try that option and let you know Ray !!
Thanks in Advance for all the support !!
Thanks,
John
It may be that you're getting a timeout error return code, although I don't find return code 269 documented anywhere. It looks like from your autosys log that it started the job at 11/17/2011 10:39am and waiting until 11/18/2011 6:45am, so that duration makes me suspect a timeout while dsjob waited.
I am able to run a job using dsjob -wait or -jobstatus options or with using both options at one time, but depending on which options are used, the status code returned is 0 or 1. The Programmers Guide PDF on the client describes these options and I don't see any reason to use both options together at the same time. There must be some reason they return different status codes though. Perhaps that's discussed on another topic.
I am able to run a job using dsjob -wait or -jobstatus options or with using both options at one time, but depending on which options are used, the status code returned is 0 or 1. The Programmers Guide PDF on the client describes these options and I don't see any reason to use both options together at the same time. There must be some reason they return different status codes though. Perhaps that's discussed on another topic.
Choose a job you love, and you will never have to work a day in your life. - Confucius
I just noticed according to what you said about the job only taking 6 hours, that in your shell script, all the date commands use the %I descriptor for 12 hour clocks. The output fooled me at first. I would suggest changing all those to %H for 24 hour clock so you get 22 for 10:00pm instead of 10.
Also you said the job actually finishes successfully? This also makes me suspect a timeout. The shell script is setup so that if the return code is not equal to 0 or 1 then report that the job failed, but in case of a timeout, the dsjob command would not be able to know the actual job status. Does the same script report accurate return codes for other jobs that run in less than 30 minutes, or 2 hours, etc.?
Also you said the job actually finishes successfully? This also makes me suspect a timeout. The shell script is setup so that if the return code is not equal to 0 or 1 then report that the job failed, but in case of a timeout, the dsjob command would not be able to know the actual job status. Does the same script report accurate return codes for other jobs that run in less than 30 minutes, or 2 hours, etc.?
Choose a job you love, and you will never have to work a day in your life. - Confucius