Exit cleanly from a Sequence job?

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
val
Participant
Posts: 21
Joined: Tue Jun 05, 2007 4:11 pm

Exit cleanly from a Sequence job?

Post by val »

I've searched the docs and the forums, but can't find much to go on for this problem:

I have a sequence job that is scheduled to start in the morning, runs all day waiting for input files, processes them through a few server jobs, then loops back and waits for more input until a certain time of day passes. At that point, I route to a Terminator stage to nicely ask the jobs to stop and then exit.

This all works fine, but when the Terminator executes, it logs an Abort in the job log. But I don't want an Abort -- this is not an unexpected failure, but normal successful completion at the end of the run window. We send emails to Admins on abort, and we run reports every morning looking for aborted jobs, because we take them to mean something bad happened that we need to fix. I don't want to pollute those logs with bogus 'failures', or send unnecessary problem emails.

It doesn't look like there's any way to make the Terminator log a different status. Is there any other technique I can use to cause the sequence job to exit cleanly? I'm OK with logging a warning, but don't want an abort.

Is there anything in DataStage Basic, the built-in routines, a shell script, etc. that I can use to stop the job without Abort?

Thanks!

- Val
chulett
Charter Member
Charter Member
Posts: 43085
Joined: Tue Nov 12, 2002 4:34 pm
Location: Denver, CO

Post by chulett »

Don't use a Terminator for that purpose as you are not 'terminating' anything. Simply run to a Sequencer as the last thing in the job stream and the process will just stop gracefully and exit without any fuss.
-craig

"You can never have too many knives" -- Logan Nine Fingers
val
Participant
Posts: 21
Joined: Tue Jun 05, 2007 4:11 pm

Post by val »

Thanks for the tip! I've been lamenting the lack of a 'sink' stage that I can route to when I want to just do nothing but exit. This will do the trick -- not as self-explanatory as I'd like, but functional. Thanks again!
chulett
Charter Member
Charter Member
Posts: 43085
Joined: Tue Nov 12, 2002 4:34 pm
Location: Denver, CO

Post by chulett »

Give it an appropriate name and that will go a long way towards the 'self explanatory' part. :wink:
-craig

"You can never have too many knives" -- Logan Nine Fingers
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Post by ray.wurlod »

I prefer to use a Routine activity as a sink, so as to log an entry reporting that the job sequence reached that point.

You could use UtilityMessageToLog as the routine. I don't, because it returns 1 - I use a clone of it that always returns 0.
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
chulett
Charter Member
Charter Member
Posts: 43085
Joined: Tue Nov 12, 2002 4:34 pm
Location: Denver, CO

Post by chulett »

Pretty much all objects include a place for 'Logging Text'... including Sequencers. No need for a routine. :wink:
-craig

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