Page 1 of 1

dsjob -wait is not waiting till the job completes

Posted: Sat Mar 03, 2018 9:56 am
by karumudi7
Hello,

I have a datastage sequencer which will wait till it finds the file and once the file is available, it process the rest. The sequencer is working fine without any issues for years through DS scheduler.

We have a new requirement and now I have to trigger this from a Unix script instead of DS scheduler. So I wrote a script and removed the DS schedule.

The first day it ran fine as the dependent file is available by the time of schedule and on the second day, the file was not readily available at the time of schedule. So the sequencer has to wait for the file.

The trigger script started at 4 AM as per the schedule and fired the sequencer. But after an hour, I see the script moved to next lines of the script even though the sequencer is in "Running" state and exit with code 4.


Code: Select all

$DS_BIN_DIR/dsjob -domain NONE -server $IIS_SERVER -user $USER_NAME -password $PASSWORD -run ${JOB_PARAMETERS} -warn 0 -wait -mode NORMAL ${PRJ_NAME} ${JOB_NAME}


#---------------------------------------------- POST RUN VALIDATION ----------------------------------------------------#

POST_STATUS=$($DS_BIN_DIR/dsjob -domain NONE -server $IIS_SERVER -user $USER_NAME -password $PASSWORD -jobinfo ${PRJ_NAME} ${JOB_NAME} 2> /dev/null | grep 'Job Status' | cut -d':' -f2 |  sed 's/^ *//;s/ *$//' | cut -d'(' -f1 | sed 's/ *$//')


if [ "$POST_STATUS" == "RUN OK" ]
then
 exit_status=0
else
 exit_status=4
fi

echo "Job completed at `date` with status as $POST_STATUS."
Log:

Code: Select all

Process to trigger the DataStage job has started at Sat Mar  3 04:00:06 EST 2018
Seq1 was in ---- RUN OK ---- state.
Waiting for job...
Job completed at Sat Mar  3 05:00:09 EST 2018 with status as RUNNING.
Is "-wait" waits only for 1 hour or the max -wait time is something configured in DS somewhere?

Posted: Sat Mar 03, 2018 4:06 pm
by chulett
This may help. Not that it matches exactly up with your situation but does let you know there is a "client/server timeout setting" that may be at play here. Where that is, however, I have no idea.

Posted: Thu Mar 08, 2018 2:02 pm
by chulett
Any luck with this?