Page 1 of 1

Job sequencer not returning error status

Posted: Sun Dec 02, 2018 6:03 am
by challard1
Hello,

Datastage version 11.5

I do have a Sequencer Job Jq_Batch_Id_Temporaire thats is starting a Parallel Job Jx_Id_Temporaire.
This is run thru a dsjob command line in a script as follow :
dsjob -server :$DSRPCD_PORT_NUMBER -run -jobstatus w83_dev Jq_Batch_Id_Temporaire
STATUS=$?

When a warning occurs in Parallel job Jx_Id_Temporaire (Warning, status 2), the job status of the Sequencer Jq_Batch_Id_Temporaire finishes OK (status 1).

So the warning is not caught in the script running the dsjob, which finishes OK, STATUS=1

Is there an easy way to get the get the status of the Sequencer job with the warning status?

Thanks for your help.

Posted: Sun Dec 02, 2018 10:07 am
by chulett
The sequence job itself would need to fail in some fashion to allow the script to see it. Are you doing anything post Job Activity to check the status of the Parallel job's run? Perhaps something as simple as a conditional check to a Terminator would be in order if you want the Sequence itself to fail if any of the jobs it runs have issues. I don't recall all of the options built into Sequence jobs off the top of my head but there may also be something there to "automatically handle" things that fail?

Posted: Sun Dec 02, 2018 10:56 am
by challard1
In the sequencer, there is a Terminator activity that is called when warning is issued.
However after that terminator the sequencer finishes ok.

Posted: Sun Dec 02, 2018 11:06 am
by challard1
I figured it out with your help Craig.
In the sequencer properties if I select 'Log warnings after activities that finish with status other than OK' the sequencer now finishes with warning.
Many thanks.