Question regarding Sequences

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
ramesh_c
Participant
Posts: 27
Joined: Thu Dec 14, 2006 3:37 am
Location: delhi

Question regarding Sequences

Post by ramesh_c »

Hi All;
I am new to data stage
I am trying to run the sequences with 5 Jobs in it. What i want is when the job is aborted say 3rd job due to some reason. I want to stop the sequencer with out running the remaining jobs. How this can be done?
Another question when i rectified the aborted job and restart the sequence then i want to run the sequence from the job where it gets aborted. I think this can be done by enabling check points .
Please correct me if i am wrong.

Thanks in advance
Ramesh.[/b]
JoshGeorge
Participant
Posts: 612
Joined: Thu May 03, 2007 4:59 am
Location: Melbourne

Re: Question regarding Sequences

Post by JoshGeorge »

In the sequence from all the jobs connecting to the next one use links with condition ok and warning.
I want to stop the sequencer with out running the remaining jobs
Joshy George
<a href="http://www.linkedin.com/in/joshygeorge1" ><img src="http://www.linkedin.com/img/webpromo/bt ... _80x15.gif" width="80" height="15" border="0"></a>
oracle
Participant
Posts: 43
Joined: Sat Jun 25, 2005 11:52 pm

Re: Question regarding Sequences

Post by oracle »

you can enable checkpiont in sequencer job properties or at project level
in administrator to run from the point of failure.
Mike3000
Participant
Posts: 24
Joined: Mon Mar 26, 2007 9:16 am

Post by Mike3000 »

Just to make it more clear.

Use the following job architecture:
job1-(trgOK)>job2-(trgOK)>job3-(trgOK)>job4-(trgOK)>job5
|(trgFail) |F |F |F |F
------------------------------------------------------------------
sequencer
|
terminator

As for resuming reprocess from the 3rd job,
just make it //Add checkpoints, so sequence is restartable on failure//

Also keep in mind, that you need to understand the returning
codes for triggers : OK, FAILED, OTHERWISE, WARNINGS

Also please give us a feedback, if it helped
Edited by Mike3000
ramesh_c
Participant
Posts: 27
Joined: Thu Dec 14, 2006 3:37 am
Location: delhi

Post by ramesh_c »

Hi All;

Thank you very much for the response.
I tried with the way you guys mentioned . In the Job1 I made the Trigger properties as OK conditional and done the same foe all other jobs in the sequence. when i trying to run the sequence after the first job is executed succesfully then itis coming out from the sequence with out runing the next jobs.
Please tell me if i am doing any thing wrong.

Thanks;
Shyam.
Minhajuddin
Participant
Posts: 467
Joined: Tue Mar 20, 2007 6:36 am
Location: Chennai
Contact:

Post by Minhajuddin »

Are you using the "Sequencer" and "Terminator" activity stages?
Minhajuddin

<a href="http://feeds.feedburner.com/~r/MyExperi ... ~6/2"><img src="http://feeds.feedburner.com/MyExperienc ... lrow.3.gif" alt="My experiences with this DLROW" border="0"></a>
ramesh_c
Participant
Posts: 27
Joined: Thu Dec 14, 2006 3:37 am
Location: delhi

Post by ramesh_c »

I am not usingthe sequencer stage.But i am using the terminator activity stage along with the exception stage.
Can you please tell me the process how to do with the sequencer and terminator activity stage in detail ?

Thanks for your response

ramesh
JoshGeorge
Participant
Posts: 612
Joined: Thu May 03, 2007 4:59 am
Location: Melbourne

Post by JoshGeorge »

--------- ---------->ok
(Job1) ---->warning (Sequencer1 (Set as any)) ---> Job2
|
|
Fail
(exception stage + Terminator stage)
Joshy George
<a href="http://www.linkedin.com/in/joshygeorge1" ><img src="http://www.linkedin.com/img/webpromo/bt ... _80x15.gif" width="80" height="15" border="0"></a>
ramesh_c
Participant
Posts: 27
Joined: Thu Dec 14, 2006 3:37 am
Location: delhi

Post by ramesh_c »

Hi George;

Thanks, Here do ineed to use two triggers (ok and warnings)? .Another doubt is what is the execution actiondo i need to keep whether (Run or Reset when required and Run).

Thanks;
Ramesh
chulett
Charter Member
Charter Member
Posts: 43085
Joined: Tue Nov 12, 2002 4:34 pm
Location: Denver, CO

Post by chulett »

You only need two triggers (or one composite one) if you want the next job to run if the previous one 'Ran OK' or Finished with Warnings. Is that the case? Or should warnings cause things to stop?

I pretty much always use the 'Reset if required' option. Can't even think right now when I wouldn't. :?
-craig

"You can never have too many knives" -- Logan Nine Fingers
chucksmith
Premium Member
Premium Member
Posts: 385
Joined: Wed Jun 16, 2004 12:43 pm
Location: Virginia, USA
Contact:

Post by chucksmith »

In general, you may want to have four triggers from each job activity stage: a failed, two warnings, and an otherwise. Also, each job activity stage should be paired with an "ANY" sequencer stage.

All of the failed triggers from each job activity stage should be connect to an "ANY" sequencer stage, and the sequencer stage can trigger whatever cleanup and notification is required.

One of the warning triggers from each job activity stage should be connect to an "ANY" sequencer stage, and the sequencer stage can trigger whatever cleanup and notification is required.

The remaining warning and otherwise triggers of a job activity stage should be connected to its paired sequencer stage, and this paired sequencer stage should have a trigger that fires to initiate the execution of the next sequential job activity stage.

Okay, too many words. Let's have some pictures:

Code: Select all

S <--------------------Job Activity 1-----------------> S
E       Failed          |         |        Warning      E
Q                       | O       | W                   Q
U                       | T       | A                   U
E                       | H       | R                   E
N                       | E       | N                   N
C                       | R       | I                   C
E                       | W       | N                   E
R                       | I       | G                   R
R                       | S       |                     R
R                       | E       |                     R
R                       V         V                     R
R                       Sequencer 1                     R
R                            |                          R
R                            |                          R
R                            V                          R
S <--------------------Job Activity 2-----------------> S
E       Failed          |         |        Warning      E
Q                       | O       | W                   Q
U                       | T       | A                   U
E                       | H       | R                   E
N                       | E       | N                   N
C                       | R       | I                   C
E                       | W       | N                   E
R                       | I       | G                   R
R                       | S       |                     R
R                       | E       |                     R
R                       V         V                     R
R                        Sequencer 2                    |
R                            |                          |
R                            |                          | 
R                            |                          |
|                            v                          |
+-------------------------> OR --------> AND <----------+
|                                         |
|                                         v
|                             Warning Notification Activity
V
Abort Notification Activity

The next problem you encounter is that the output trigger of the warning sequencer only fires when the first warning occurs. If your warning sequencer triggers a notification activity stage, then you may want to delay that stage until the job is complete. One wany to do this is to link triggers from your last job activity paired sequence stage and another output trigger from the failed collector sequencer stage to a new "ANY" sequencer. Call this stage "OR". Connect an output trigger from "OR" to a new "ALL" sequencer. Call this stage "AND". Connect another output trigger from the warning collector sequencer stage to "AND". Finally, connect an output trigger from "AND" to the notification activity stage to let someone know that warnings have been detected and should be reviewed.

Basically, you have implemented a rule that if warnings are detected and this job sequence has (finished or aborted) then send a warning email else do not send the email.

Of course, starting and finishing emails that report your job parameters are also nice.

Now we can sleep easily, knowing that is something goes wrong, our job sequences will email us.
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Post by ray.wurlod »

You can sleep even easier if you make the recipient someone who doesn't know your phone number!
:lol:
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