Job 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
denzilsyb
Participant
Posts: 186
Joined: Mon Sep 22, 2003 7:38 am
Location: South Africa
Contact:

Job Sequencer

Post by denzilsyb »

Hi all

I decided I would go along with technology and start using Job Sequencer.
Its actually quite easy, but I am left in the dark on a few things;

I have:

Code: Select all



1AJActivity ---> 1Sequence ---> 2Jactivity ---> 2Sequence ---> Mail
                   |                                |
1BJActivity -----------------------------------------


where 1BJActivity is not what you think :D
But, 1A and 1B are to execute, if ANY succeed 2Jactivity can continue. Should 1B OR 2Jactivity fail, email me.

Now this is simple enough and works. Now the Sequencer gets a little more complex and I have 5 inputs (from jobs or sequences) that lead into a final sequencer - if ANY of them fail i need to be mailed. but alas, for some reason when i have set up the job i get Variable "OTOK" not assigned a value. So I start deleting links that refer to "Failed - Conditional", and after each link i delete I attempt to compile. And then suddenly it compiles after deleting a specific link from a job. Is there any reason why I would get the OTOK message even after I have set the condition the same as others that do work?

At the moment I have added a Custom Condition that states "Execution Failed", but i dont think its going to work.

Also, what is the nested condition used for? :?: F1 has nothing on it.
dnzl
"what the thinker thinks, the prover proves" - Robert Anton Wilson
chulett
Charter Member
Charter Member
Posts: 43085
Joined: Tue Nov 12, 2002 4:34 pm
Location: Denver, CO

Post by chulett »

Ok, what is the unexpected 1BJActivity?

Let's see... if both 1A and 1B are to run before 2J, then both should be linked to just the 1Sequence. Set the mode to 'Any' and you should be fine. You don't need the second sequence for this purpose.

I generally only use two triggers - 'Ran Ok' and 'Otherwise', unless I specifically need to handle 'Warnings'. The Otherwise catches all failures, not just when a job aborts. In your version, you should be running that Otherwise link to a single sequence set to 'Any' and then from there to your error email Notification Activity. In order you trap from the last job in the line, end your process with a sequence with nothing after it. This allows the 'Ran Ok' link to go somewhere. either that or run it to another Notification Activity that emails out the success of your process.

The Nested Condition stage allows you to make a decision in a job stream and split the process or join it at different points. I have a job that checks the results of one job and, if it doesn't process any rows, skips several of the following jobs that need to run only if that job actually does something. Or you can go to ADN and download the 'Restartable Job example' from the File Library, it is a good example of how the stage can be used to jump into a job stream at different points.
-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 »

The Job Sequence is a GUI from which job control code is generated.
Go to the Job Control tab in job properties and examine the code. Compare it to how you would have coded it. This gives good insight into best strategies for using Job Sequences for those who used to write job control code by hand.
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
Post Reply