Sequencer(server edition)

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
dslearner
Premium Member
Premium Member
Posts: 67
Joined: Thu May 26, 2005 3:09 am

Sequencer(server edition)

Post by dslearner »

Hi,

Please tell me any one know

Actually I am using Sequencer job, in that one DS Job depends on two DS Jobs. First I took the two job activities and one sequencer (All Mode) and finally one job Activity. Here I am using the routine activity for getting the individual job warnings and fatal error. Routine activity is call to each DS Job.
I have specified trigger condition for success (Job Status <>3) and failed (failed) for each DS job activity. When the individual DS job was aborted then routine activity written log file in corresponding directory. When the individual DS Job had finished with see log that time routine activity not written any log file.
After that I had written trigger condition at failed option as (DS Jobstatus = 2 or DS Jobstatus = 2). Routine activity was not performing any thing, when job was aborted or finished (see log).

I need the Log file when job is aborted or finished (see log). Please tell any one.
richdhan
Premium Member
Premium Member
Posts: 364
Joined: Thu Feb 12, 2004 12:24 am

Post by richdhan »

Hi DSLearner,

For two job activities success triggers use the following condition

JobActivityName.$JobStatus= 1 or JobActivityName.$JobStatus= 2
(Job is finished or finished with warnings)

Use the Unconditional Trigger for the routine activites so that the log file is written both for success and failure

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

Post by ray.wurlod »

There are a few possibilities along these lines.

For example you can have a Custom condition encompassing both success and warnings, like Rich suggested, on each Job Activity.

Another approach is to have a Failed trigger and and Otherwise trigger (this has the benefit of colouring your Failed trigger red).
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
richdhan
Premium Member
Premium Member
Posts: 364
Joined: Thu Feb 12, 2004 12:24 am

Post by richdhan »

Hi Ray,

The log file needs to generated for both success and failure.

With Otherwise Trigger it will be generated for only one condition.

Pls Clarify.

Thanks
--Rich
dslearner
Premium Member
Premium Member
Posts: 67
Joined: Thu May 26, 2005 3:09 am

Post by dslearner »

Hi Rich,

Thanks for ur help ,I gave above condition,but when the job was aborted that time routine does not written any log file.
i tried JobActivityName.$JobStatus= 1 or JobActivityName.$JobStatus= 2 Or JobActivityName.$JobStatus <>3,This time also not written any log file.
I gave Otherwise Trigger condition also ,But not written any log file.

Please tell me any other option.
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Post by ray.wurlod »

If there are two triggers, Otherwise and Failure, you have two branches. On the non-Failure branch you could use a Nested Condition activity to decide whether to log anything based on the job status.

Or you could have four triggers; one OK, two Warning, one Otherwise. The OK and one warning run into an Any sequencer then on to further processing. The other warning and Otherwise run into an Any sequencer then on to logging.

Lots of other possibilities.
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
dslearner
Premium Member
Premium Member
Posts: 67
Joined: Thu May 26, 2005 3:09 am

Post by dslearner »

Hi Ray,

Thanks you are valuable help.

First two jobs activity had set the trigger conditions, success condition (Ok) Failure condition (Otherwise), In these case when job Aborted or finished (see log) then write into the log file in to a respect folder.

After two jobs success (Sequencer) then go to third job activity. This job activity has only one trigger condition as when third job activity should be written into log file when the job was aborted or finished (see log).

Please tell me, which trigger condition can I give there.
rleishman
Premium Member
Premium Member
Posts: 252
Joined: Mon Sep 19, 2005 10:28 pm
Location: Melbourne, Australia
Contact:

Post by rleishman »

I am having a bit of trouble understanding the English translation of this problem, but now I think I have it.
You have two independent jobs with output links to a Sequencer. The output link of the Sequencer is to a Routine that writes a log file. You want the Routine to fire whenever there is a failure in either job.

You mention that the Sequencer is set to ALL instead of ANY. I think that ANY would be the correct setting in this case, as you want the routine to fire if ANY of the jobs fail. Combine this with triggers on the output links of the jobs so that they only fire on ABORT and you should get the desired result.

OR....

A better way to do this is as follows:
  • In the Job Sequence "Properties" window, check "Automatically handle activities that fail". This means that when any job aborts, the Sequence will (attempt to) abort.
  • Delete the Sequencer - you don't need it.
  • Drag in an Exception Handler activity, and create a link from it to the log routine.
  • If you want the Job Sequence to exit without error, that's all you need to do. If you want the job sequence to abort, link the Routine to a Terminator Activity.
Now, when anything in the Job Sequence fails you have automated exception handling. :)
Post Reply