How to run jobs in a sequencer based on input value

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
SonShe
Premium Member
Premium Member
Posts: 65
Joined: Mon Aug 09, 2004 1:48 pm

How to run jobs in a sequencer based on input value

Post by SonShe »

I have a sequencer with a few jobs in it. The jobs are not dependant on each other. I would like to run only some of the jobs in the sequencer. For example, out of jobs A, B, C, and D I want only A and C to run based on the input parameter value. Can I do something like this? If so, I would appreciate for any idea or help.

Thanks in advance.
roy
Participant
Posts: 2598
Joined: Wed Jul 30, 2003 2:05 am
Location: Israel

Post by roy »

Hi,
the starting point should be a nested condition stage having triggers that start the job asctivities depending on the conditions you mention.

IHTH,
Roy R.
Time is money but when you don't have money time is all you can afford.

Search before posting:)

Join the DataStagers team effort at:
http://www.worldcommunitygrid.org
Image
SonShe
Premium Member
Premium Member
Posts: 65
Joined: Mon Aug 09, 2004 1:48 pm

Post by SonShe »

roy wrote:Hi,
the starting point should be a nested condition stage having triggers that start the job asctivities depending on the conditions you mention.

IHTH,
Thanks for the reply. I could develop using nested condition and control running of the independent jobs.

However if I have two jobs - the first one triggers the second job when the first one completes successfully. In this situation if the second one aborts, then I would like to run only the second one. If the first one fails I want to run both. Can I use the same nested condition trick? If so, how do I do that?

I will appreciate any help.

Thanks
roy
Participant
Posts: 2598
Joined: Wed Jul 30, 2003 2:05 am
Location: Israel

Post by roy »

hmm, version 6 still doesn't have restartable fomr fialour point capabilities so you might need to use control job to get it done.

IHTH,
Roy R.
Time is money but when you don't have money time is all you can afford.

Search before posting:)

Join the DataStagers team effort at:
http://www.worldcommunitygrid.org
Image
vmcburney
Participant
Posts: 3593
Joined: Thu Jan 23, 2003 5:25 pm
Location: Australia, Melbourne
Contact:

Post by vmcburney »

You could have a flag for each job set to Y or N. You have a nested condition that has four links, three links go straight to jobs A, C and D. The second trigger goes to a sequencer stage set ANY. Job A has a link to this same sequencer stage. The three direct links have a trigger of FLAGA='Y'
FLAGC='Y'
FLAGD='Y'

Code: Select all

       condition stage
     /    |     |    \
joba --- seq     jobc  jobd
          |
        jobb
The 2nd trigger has
FLAGA='N' and FLAGB='Y'
Job A needs a double trigger, continue if JOBA status is OK and FLAGB='Y'. If you don't want to code a double trigger you can put a condition stage between JOBA and the sequencer stage which is set to FLAGB='Y'.

So when you run the job you set all flags to Y. When you restart after a failure you can choose any combination of flags you want. If you set FLAGA to N it will go down the other sequencer route.
Post Reply