dsjob -wait is not waiting till the job completes

A forum for discussing DataStage<sup>®</sup> basics. If you're not sure where your question goes, start here.

Moderators: chulett, rschirm, roy

Post Reply
karumudi7
Participant
Posts: 20
Joined: Sun Mar 11, 2012 3:30 am
Location: Detroit
Contact:

dsjob -wait is not waiting till the job completes

Post 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?
DataStage 11.3 on AIX 7.1 with DB2.
chulett
Charter Member
Charter Member
Posts: 43085
Joined: Tue Nov 12, 2002 4:34 pm
Location: Denver, CO

Post 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.
-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 »

Any luck with this?
-craig

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