Sequencer design

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
sam334
Premium Member
Premium Member
Posts: 145
Joined: Mon Aug 26, 2013 7:42 pm

Sequencer design

Post by sam334 »

All, Need a help in sequencer design. I have a sequencer,

Job Activity----Execute Command---Wait For File Activity-- Job Activity2

Basically, when after Job1 is completed there is a batch file which count the rows through execute command. If rows >100 then the batch file creates a blank.txt file- after Wait file will wait for the file and trigger Job2.

Now issue is if the count is <100 then the blank.txt file wont generate and wait activity will wait for 10 mints then abort.

What should we do if we dont want to abort the job. I mean, wait file activity will wait for 10 mints and then the sequencer should finish but Job2 should not trigger.

Can we use exception handling or terminator activity.

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

Post by ray.wurlod »

Designing a Sequencer is simple; you have only one choice, whether to run it in Any mode or All mode.

Your question is about a Sequence.

Take an extra trigger from your Execute Command activity to handle the <100 case. Take this to an Any Sequencer. Take an unconditional trigger from JobActivity2 to the same Sequencer. Done.
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
Mike
Premium Member
Premium Member
Posts: 1021
Joined: Sun Mar 03, 2002 6:01 pm
Location: Tampa, FL

Post by Mike »

Kind of a waste to create and wait for a dummy file... and I suppose you need to clean up that dummy file before your next cycle.

A simpler design is to have the executed command write the row count to stdout and then put a Nested Condition activity after it to direct flow based on the row count in the command's output.

Mike
sam334
Premium Member
Premium Member
Posts: 145
Joined: Mon Aug 26, 2013 7:42 pm

Post by sam334 »

Thanks a lot. But kind of stuck here.

So, we have ,

JOB ACTIVTTY1--EXECOMMAND---Nester Condition--JobActivity2

In Execute command we have the batch script and output is 12000 (count)--Trigger is Ok conditional.

Then in Nested condition, Custom(Conditional)-Trim(Execute_Command_1.$CommandOutput)>1000.. Do I need to use IF conditions here? If $CommandOutput)>1000 then go to Job2 else $commandoutput.

Thanks.
kduke
Charter Member
Charter Member
Posts: 5227
Joined: Thu May 29, 2003 9:47 am
Location: Dallas, TX
Contact:

Post by kduke »

You do not have to use an exception handler. You can execute a failed link which all it does is go straight to last sequencer before the end. Then Job2 never executes and it does not abort. You can have as many links as you want coming after a job or a wait for file. Each with there own status. Normally all people do is a link on job ok status then let the exception handler handle everything else. You can add another link for warnings or failed or whatever combination you want. Very useful.
Mamu Kim
sam334
Premium Member
Premium Member
Posts: 145
Joined: Mon Aug 26, 2013 7:42 pm

Post by sam334 »

Worked. Thanks all a lot.
Post Reply