Job Sequence completed successful even a job aborted status

Post questions here relative to DataStage Enterprise/PX Edition for such areas as Parallel job design, Parallel datasets, BuildOps, Wrappers, etc.

Moderators: chulett, rschirm, roy

nekkalapudi
Participant
Posts: 21
Joined: Tue Jul 18, 2006 2:38 pm

Job Sequence completed successful even a job aborted status

Post by nekkalapudi »

Hi,

Created a sequence to run couple of jobs.
While running one of the job aborted, but
Seq_BILLOMAT..JobControl (@Coordinator): Summary of sequence run
15:43:26: Sequence started (checkpointing on)
15:43:26: Setup_BILLOMAT (JOB Setup_BILLOMAT_Source_Extract) started
15:43:50: Setup_BILLOMAT (JOB Setup_BILLOMAT_Source_Extract) finished, status=2 [Finished with warnings]
15:43:50: Process_BILLOMAT (JOB Process_BILLOMAT_Final) started
15:43:52: Process_BILLOMAT (JOB Process_BILLOMAT_Final) finished, status=3 [Aborted]
15:43:52: notify_Process_BILLOMAT_failure (ROUTINE DSSendMail) started
15:43:52: notify_Process_BILLOMAT_failure finished, reply=-21
15:43:52: Sequence finished OK
and removed the check points.
One more thing is the aborted job is displayed as warning in the log.

My doubts is why the sequence completed successfully even one of the jobs aborted and why the log is showing as warning.

any help is greatly appreciated.

Thanks,
Omkar
Omkar
DSguru2B
Charter Member
Charter Member
Posts: 6854
Joined: Wed Feb 09, 2005 3:44 pm
Location: Houston, TX

Post by DSguru2B »

Go to the job properties of the sequence job and check out the job properties. You must have checked the "Automatically handle jobs that fail". Thats why the job is finishing rather than aborting.
Creativity is allowing yourself to make mistakes. Art is knowing which ones to keep.
Krazykoolrohit
Charter Member
Charter Member
Posts: 560
Joined: Wed Jul 13, 2005 5:36 am
Location: Ohio

Post by Krazykoolrohit »

Or you would have set the trigger in job property inside sequencer as "unconditional"
nekkalapudi
Participant
Posts: 21
Joined: Tue Jul 18, 2006 2:38 pm

Post by nekkalapudi »

DSguru2B wrote:Go to the job properties of the sequence job and check out the job properties. You must have checked the "Automatically handle jobs that fail". Thats why the job is finishing rather than aborting.
I checked Add Checkpoint so sequence is restartable on failure and Log Warnings after activities that finish with status other than OK only.
Omkar
nekkalapudi
Participant
Posts: 21
Joined: Tue Jul 18, 2006 2:38 pm

Post by nekkalapudi »

Krazykoolrohit wrote:Or you would have set the trigger in job property inside sequencer as "unconditional"
Tirgger used custom conditional. Checking job status.
Omkar
Krazykoolrohit
Charter Member
Charter Member
Posts: 560
Joined: Wed Jul 13, 2005 5:36 am
Location: Ohio

Post by Krazykoolrohit »

Can you please post the sequence flow.
nekkalapudi
Participant
Posts: 21
Joined: Tue Jul 18, 2006 2:38 pm

Post by nekkalapudi »

Krazykoolrohit wrote:Can you please post the sequence flow.
I didn't get exactly what you are asking. Any way
I have three jobs, in the job sequence added three job activity stages and added mail notifications to each job activity sends mail if the job aborts.
As I stated earlier for trigger used custom conditional, validating Job status and for job seq properties checked Add check point and Log warninig after job activity. If I am wrong please let me know.

Thnaks,
Omkar
meena
Participant
Posts: 430
Joined: Tue Sep 13, 2005 12:17 pm

Post by meena »

Hi,

The Sequencer shows you that it is finished successfully even after a job abort because the sequencer is able to send the email notification.You have triggers for the job activity stage: one for success of the job as to go to next job and second if the job aborted then send a email notification. Here in your sequencer the job aborted but it is able send the email notification successfully so the sequencer finished with success.
My doubts is why the sequence completed successfully even one of the jobs aborted and why the log is showing as warning.
nekkalapudi
Participant
Posts: 21
Joined: Tue Jul 18, 2006 2:38 pm

Post by nekkalapudi »

meena wrote:Hi,

The Sequencer shows you that it is finished successfully even after a job abort because the sequencer is able to send the email notification.You have triggers for the job activity stage: one for success of the job as to go to next job and second if the job aborted then send a email notification. Here in your sequencer the job aborted but it is able send the email notification successfully so the sequencer finished with success.
My doubts is why the sequence completed successfully even one of the jobs aborted and why the log is showing as warning.
Mail was not sent successfully, following is the error:
Seq_BILLOMAT..JobControl (@notify_Process_BILLOMAT_failure): Routine DSSendMail did not finish OK, return code = '-21'

Thanks,
Omkar
NBALA
Participant
Posts: 48
Joined: Tue Jul 11, 2006 11:52 am
Location: IL, USA

Post by NBALA »

Hi,

Check the Mail properties like SMTP mail server and From & To mail addresses (some mailserver could not mail thru internet like to your yahoo id).

And verify the triggers, you can use triggers for each link or you can use the custom trigger. If you use custom - check how many conditions you have. If you have only one condition then the event will be triggered for that condtion, use 'or' operator if you want to trigger an event for any of the condition.

Provide more details on the triggers used.

-NB
thumsup9
Charter Member
Charter Member
Posts: 168
Joined: Fri Feb 18, 2005 11:29 am

Post by thumsup9 »

You seem to have used Expression Type as Custom - Conditional. Can you please post the Expression you used.
nekkalapudi
Participant
Posts: 21
Joined: Tue Jul 18, 2006 2:38 pm

Post by nekkalapudi »

thumsup9 wrote:You seem to have used Expression Type as Custom - Conditional. Can you please post the Expression you used.
Custom trigger expression: -
Process_BILLOMAT.$JobStatus = 2 or Process_BILLOMAT.$JobStatus = 1

Thanks,
Omkar
nekkalapudi
Participant
Posts: 21
Joined: Tue Jul 18, 2006 2:38 pm

Post by nekkalapudi »

NBALA wrote:Hi,

Check the Mail properties like SMTP mail server and From & To mail addresses (some mailserver could not mail thru internet like to your yahoo id).

And verify the triggers, you can use triggers for each link or you can use the custom trigger. If you use custom - check how many conditions you have. If you have only one condition then the event will be triggered for that condtion, use 'or' operator if you want to trigger an event for any of the condition.

Provide more details on the triggers used.

-NB
For each Job activity used two links. 1) On success go th next stage. Used custom Trigger. 2) Failed link used to send mail.

Thanks,
Omkar
kris007
Charter Member
Charter Member
Posts: 1102
Joined: Tue Jan 24, 2006 5:38 pm
Location: Riverside, RI

Post by kris007 »

That explains things. Since you have used a failure trigger, the Job sequence reads it as you are handling the failure activities. So, as per the Job sequence, when the job aborts it sends an email and its job is done and hence the successful message. If you want the sequence to abort when a job fails, place a Terminator activity or UtilityAbortToLog routine stage after the Notification stage and that will give you what you want.
Kris

Where's the "Any" key?-Homer Simpson
thumsup9
Charter Member
Charter Member
Posts: 168
Joined: Fri Feb 18, 2005 11:29 am

Post by thumsup9 »

nekkalapudi wrote:
thumsup9 wrote:You seem to have used Expression Type as Custom - Conditional. Can you please post the Expression you used.
Custom trigger expression: -
Process_BILLOMAT.$JobStatus = 2 or Process_BILLOMAT.$JobStatus = 1

Thanks,
One way to do this is if Process_BILLOMAT.$JobStatus <> DSJS.RUNOK then send this to Notification Activity and then to a Routine Activity. You can call a routine like below in your routine activity and that should abort the sequencer if the job status is other than OK.

Function rtFatalError(Arg1)

Call DSLogFatal("one or more jobs failed", Arg1)
Ans = 1

just a drop in an ocean of ideas...
Post Reply