Checking particular condition in Routine activity(Sequencer)

Post questions here relative to DataStage Server Edition for such areas as Server job design, DS Basic, Routines, Job Sequences, etc.

Moderators: chulett, rschirm, roy

Post Reply
kaps
Participant
Posts: 452
Joined: Tue May 10, 2005 12:36 pm

Checking particular condition in Routine activity(Sequencer)

Post by kaps »

Hi

Requirement is to check for header, trailer formats, check the counts in the trailer of incoming file and if everything is correct then run the job or don't run the job.

I have a shell script to do all of the above and I am calling this script from a routine. I have to check for 3 files so I have 3 routines with difft file name to check in the same job. I am exiting with "Invalid Header Record" when it happens which I could see in the log.

I have a custom condition in Triggers of all the three routines which checks the condition and sends the error mail and stops the job...

rtn.$ReturnValue= "Invalid Header Record"

But it's not stopping the job. It shows as successfully completed.
Can anyone tell me what am I missing ?

Thanks
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Post by ray.wurlod »

You've marked this as resolved. What were you missing?
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
kaps
Participant
Posts: 452
Joined: Tue May 10, 2005 12:36 pm

Post by kaps »

I returned number from the shell script isntead of string.

rtn.$ReturnValue= "Invalid Header Record" (did not work)

rtn.$ReturnValue= 1 (worked)
Post Reply