Capturing Invocation Id
Moderators: chulett, rschirm, roy
-
- Participant
- Posts: 197
- Joined: Mon Feb 17, 2003 11:20 pm
- Location: India
Capturing Invocation Id
Hi All,
I have a multiple instance sequencer Job that calls various other multiple instance jobs. Whenever I run a serquencer job I give an Invocation id.
Now is there any was to capture this invocation id within the sequencer job and pass it to the other multiple instance jobs that the sequencer is calling?
Regards,
-Sumit
I have a multiple instance sequencer Job that calls various other multiple instance jobs. Whenever I run a serquencer job I give an Invocation id.
Now is there any was to capture this invocation id within the sequencer job and pass it to the other multiple instance jobs that the sequencer is calling?
Regards,
-Sumit
-
- Participant
- Posts: 54607
- Joined: Wed Oct 23, 2002 10:52 pm
- Location: Sydney, Australia
- Contact:
-
- Participant
- Posts: 197
- Joined: Mon Feb 17, 2003 11:20 pm
- Location: India
When I schedule the main sequencer job I type the invocation id. Now when this main sequencer calls the other jobs I need following two things:
1) It should pass the sequencer invocation id to the invocation id of the called jobs.
I can achieve this by using the following code in the Invocation Id expression box in the Job Activity stage of the sequencer
2) It should also pass the sequencer invocation id to one of the parameters of the called jobs.
I can not use the same expression here because the parameter value expression box in Job Activity stage of the sequencer does not accept this.
Regards,
-Sumit
1) It should pass the sequencer invocation id to the invocation id of the called jobs.
I can achieve this by using the following code in the Invocation Id expression box in the Job Activity stage of the sequencer
Code: Select all
DSGetJobInfo (DSJ.ME, DSJ.JOBINVOCATIONID)
I can not use the same expression here because the parameter value expression box in Job Activity stage of the sequencer does not accept this.
Regards,
-Sumit
There's no method that I'm aware of to automatically pass a parent invocation id downstream to child jobs.
You could put your code into a routine and then executing that routine (via the Routine Actitivy stage) as one of the first things in your job sequence. Pass out the invocation id as the 'answer' generated by your routine and then use StageName.$ReturnValue in the Invocation Id for your child jobs. Haven't tried this myself, but I believe it should work.
Make sure you know that you can't use routines like this in conjunction with the new 'automatically handle' activities that fail - routines that return a non-zero code are considered to have failed.
You could put your code into a routine and then executing that routine (via the Routine Actitivy stage) as one of the first things in your job sequence. Pass out the invocation id as the 'answer' generated by your routine and then use StageName.$ReturnValue in the Invocation Id for your child jobs. Haven't tried this myself, but I believe it should work.
Make sure you know that you can't use routines like this in conjunction with the new 'automatically handle' activities that fail - routines that return a non-zero code are considered to have failed.
-craig
"You can never have too many knives" -- Logan Nine Fingers
"You can never have too many knives" -- Logan Nine Fingers
-
- Participant
- Posts: 54607
- Joined: Wed Oct 23, 2002 10:52 pm
- Location: Sydney, Australia
- Contact:
Can you not use expressions of the kind Sumitgali postulated in version 7.5? That is, use DSGetJobInfo(DSJ.ME, DSJ.JOBINVOCATIONID) in the derivation for the invocation ID?
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
I don't believe that expressions are allowed, perhaps in 7.5 (I'll have to take a ride through the docs). I was wondering about a macro, but a quick search in the 7.0.1 docs that we have installed right now didn't turn one up, so I didn't mention it.
Mike's right, that would be the easiest way to do that. Anyone know of any version restrictions on it? Does it exist back to the beginning of multi-instance jobs?
Mike's right, that would be the easiest way to do that. Anyone know of any version restrictions on it? Does it exist back to the beginning of multi-instance jobs?
-craig
"You can never have too many knives" -- Logan Nine Fingers
"You can never have too many knives" -- Logan Nine Fingers
-
- Participant
- Posts: 197
- Joined: Mon Feb 17, 2003 11:20 pm
- Location: India