Job Sequence design

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

Post Reply
ovidiu
Premium Member
Premium Member
Posts: 22
Joined: Tue Dec 20, 2005 7:14 pm

Job Sequence design

Post by ovidiu »

Hi everybody,

I need to design a sequence that triggers three jobs-A,B,C-. The sequence is executed multiple times a day.
I need one of the jobs- A -to be executed only once per day.
So for the first time all A,B,C jobs and after that within the same day only B and C.

Thank you for any advice.

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

Post by kduke »

Create a variable with the current date. Write this to a hashed file. Check this hashed file before writing to it. Make sure it is yesterday. If it is not today then run job A and write the new date to the hashed file when job A finishes.
Mamu Kim
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Post by ray.wurlod »

Control whether job activity A executes with a preceding Nested Condition activity that checks A's finish time (extracted, perhaps, in an upstream Routine activity). If it's the same date as today, bypass job activity A.

Code: Select all

Routine  --->  Nested Condition  ------> Job A ------>
                       |                                Any Sequencer  ---> Job B ---> Job C
                       +----------------------------->
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 »

Or... create two Sequence jobs. Run both the first time, then only run the second after that. Of course, the first one doesn't really need to be a Sequence if all it does is run one job, but you get the idea.
-craig

"You can never have too many knives" -- Logan Nine Fingers
kommven
Charter Member
Charter Member
Posts: 125
Joined: Mon Jul 12, 2004 12:37 pm

Post by kommven »

You need to park a trigger file somewhere and use Execute Command Stage to read the file and determine your Steps.

The higher level Design Logic maybe something like

Step0: Cat FileA; If cmd_OutPut = CurrentDate() Then Goto Step2 Else Step1
Step1: Trigger Job A
Step2: Exec_Cmd (`date`) to a FileA
Step3: Trigger Job B
Step4: Trigger Job C

Thanks for "Thanks"

-K
ovidiu
Premium Member
Premium Member
Posts: 22
Joined: Tue Dec 20, 2005 7:14 pm

Post by ovidiu »

Thank you very much

Florin
ovidiu
Post Reply