Job sequencer not returning error status

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
challard1
Participant
Posts: 22
Joined: Sat May 14, 2016 10:38 am

Job sequencer not returning error status

Post 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.
Cyrille Hallard
chulett
Charter Member
Charter Member
Posts: 43085
Joined: Tue Nov 12, 2002 4:34 pm
Location: Denver, CO

Post 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?
-craig

"You can never have too many knives" -- Logan Nine Fingers
challard1
Participant
Posts: 22
Joined: Sat May 14, 2016 10:38 am

Post 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.
Cyrille Hallard
challard1
Participant
Posts: 22
Joined: Sat May 14, 2016 10:38 am

Post 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.
Cyrille Hallard
Post Reply