Job Sequence - Trigger Question

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
Raftsman
Premium Member
Premium Member
Posts: 335
Joined: Thu May 26, 2005 8:56 am
Location: Ottawa, Canada

Job Sequence - Trigger Question

Post by Raftsman »

Job A calls Job B, Job B calls Job C. Using a parameter, I tried to set a Custom Conditional IF THEN ELSE so that if the parameter is set to bypass Job B Job A would call Job C.

I tried in Job A to say IF Parm = 1 THEN Job B ELSE Job C.

Is this possible and what is the command to execute the job that I would put in the IF statement?

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

Post by chulett »

You don't "call jobs" in triggers. By "call" do you mean they are linked in the Sequence job? :?

JobA -> JobB -> JobC

Are you looking for a way to conditionally skip JobB based on a parameter? If yes, I would use a Nested Condition with Sequencer stages for something like that.
-craig

"You can never have too many knives" -- Logan Nine Fingers
Raftsman
Premium Member
Premium Member
Posts: 335
Joined: Thu May 26, 2005 8:56 am
Location: Ottawa, Canada

Post by Raftsman »

Let me clarify this a bit more. Remove Job C from the mix.

Job A is the pre-sequence to Job B but is could be possible that Job B can be execute on its own.

It is also possible that job A or Job B could run on their own.

What I am trying to avoid is having duplicate Job Activities on the pallette. Using the Nested process, I am able to accomplish my logic but using duplicate activities. I was hoping to avoid this and somehow use the triggers

I though that I may be able to execute activities based on their name. This way I could call and bypass sequences.

If not, I will keep duplicate activities on the pallette.

Thanks
Jim Stewart
narasimha
Charter Member
Charter Member
Posts: 1236
Joined: Fri Oct 22, 2004 8:59 am
Location: Staten Island, NY

Post by narasimha »

As already noted use the Nested Condition. Based on the conditions run one or both of your succeeding jobs.

Code: Select all

                     |----> Job A
Nested Condition-----|
                     |----> Job B
HTH
Narasimha Kade

Finding answers is simple, all you need to do is come up with the correct questions.
Raftsman
Premium Member
Premium Member
Posts: 335
Joined: Thu May 26, 2005 8:56 am
Location: Ottawa, Canada

Post by Raftsman »

But A may need to run before B. That's my problem.
Jim Stewart
chulett
Charter Member
Charter Member
Posts: 43085
Joined: Tue Nov 12, 2002 4:34 pm
Location: Denver, CO

Post by chulett »

I personally wouldn't worry about 'duplicate activities' on the canvas. If it works, is maintainable and doesn't look like it was designed by a spider on crack then it's all good. :wink:
-craig

"You can never have too many knives" -- Logan Nine Fingers
Raftsman
Premium Member
Premium Member
Posts: 335
Joined: Thu May 26, 2005 8:56 am
Location: Ottawa, Canada

Job Scheduling

Post by Raftsman »

I have a job sequence that relies on entered parameters. I want to execute this job many times at the same scheduled time. I tried this and the last scheduled job is executed. All other are ignored. It doesn't look like the schedulers stacks the jobs as they are scheduled. Even though I enter the same time, should the jobs execute sequentially as entered.

Could someone please provide some insight.

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

Post by chulett »

That's... not how it works. :?

The only way this job can run 'many times at the same scheduled time' with different parameter values is if it is multi-instance.
-craig

"You can never have too many knives" -- Logan Nine Fingers
Post Reply