I need a help to pass Invocation ID at run time to a Sequenc

A forum for discussing DataStage<sup>®</sup> basics. If you're not sure where your question goes, start here.

Moderators: chulett, rschirm, roy

Post Reply
SURA
Premium Member
Premium Member
Posts: 1229
Joined: Sat Jul 14, 2007 5:16 am
Location: Sydney

I need a help to pass Invocation ID at run time to a Sequenc

Post by SURA »

Hi All

I need a help to pass Invocation ID at run time to a Sequence.


What i am trying to do?
I am triggering a SEQUENCE job (Multiple Instance) using Server Routine (TriggerRoutine). So that the SEQUENCE can trigger different jobs at the same time concurrently.


My Loop Design Approach:

GetJobsToRun --> StartLoop --> TriggerRoutine --> EndLoop

TriggerRoutine --> This will trigger a Sequence Job, which is a multiple instance in which i need to pass Invocation ID to this Sequence.


Say for example:
If i need to trigger the Sequence for the jobs J1,J2,J3. i wish the sequence to run like Seq.J1, Seq.J2, Seq.J3. So the it can be triggered almost(!) at the same time

Thanks in Adcance,
DS User
chulett
Charter Member
Charter Member
Posts: 43085
Joined: Tue Nov 12, 2002 4:34 pm
Location: Denver, CO

Post by chulett »

So... what's your actual question? :?

Without knowing how your routine runs jobs, it's hard to provide specific advice. It seems like you know you just include the Invocation ID with a 'dot' after the job name when launching it. How exactly does 'GetJobsToRun' work? Seems to me the best approach would be for it to return a delimited list of invocation ids and then you tell the Loop stage to iterate through that list. A User Variables stage is where you would typically do that work and then pass the list from there to the Loop Start.
-craig

"You can never have too many knives" -- Logan Nine Fingers
SURA
Premium Member
Premium Member
Posts: 1229
Joined: Sat Jul 14, 2007 5:16 am
Location: Sydney

Post by SURA »

I amy Sorry, i may not explained properly.

Let me explain .

I will get the list of jobs names to run for the day in a file.
Ex:
J1
J2
J3

I created a job design in Sequence to trigger the above jobs.

Command Activity --> StartLoop --> TriggerRoutine --> EndLoop

Here, TriggerRoutine will always trigger a SEQUENCE job called "StartJob" which is a multiple instance job.

What StartJob will do?

RoutineActivity --> RunAJob --> RoutineActivity

RoutineActivity --> Make an entery in a table about the job start.
RunAJob (Multiple instance) --> Server Job; Code written in Job Control to trigger a job.
RoutineActivity --> Make an entery in a table about the job end.

Expectation:
Jobs J1, J2,J3 will be triggered by the master loop job one by one in each iteration.

Wish:
J1 need to start a seperate instance StarJob.J1
J2 need to start a seperate instance StarJob .J2
J3 need to start a seperate instance StarJob .J3

This is what i am trying to do.

Let me know to do this!
Let me know if it is not a good approach.

Thanks
DS User
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Post by ray.wurlod »

You seem a little confused about how to invoke multi-instance jobs. "StartJob", for example, is a constant. Also, the invocation ID follows, rather than precedes the job name.

Best practice is to determine the sequence's invocation ID (probably in a routine activity) and pass that to the Job activities that run J1, J2 and J3.
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
SURA
Premium Member
Premium Member
Posts: 1229
Joined: Sat Jul 14, 2007 5:16 am
Location: Sydney

Post by SURA »

ray.wurlod wrote:You seem a little confused about how to invoke multi-instance jobs. "StartJob", for example, is a constant. Also, the invocation ID follows, rather than precedes the job name.

Best practice is to determine the sequence's invocation ID (probably in a routine activity) and pass that to the Job activities that run J1, J2 and J3.
Hi All

Thanks for your guidance.

I got it and did it.

I will mark it as resolved.

Thanks a lot.

DS User
Post Reply