I am trying to determine at the beggining of a sequence if it was started by another sequence, a parent. (I hope you'll understand what I am trying to tell).
I believe it is possible to do it using a parameter, right? Apart from that, Is there a different solution available? Using, for example, a Routine Activity stage?
How?
Thanks in advance for your help.
(I searched the archives for a previous post, but I am probably using the wrong keywords, because could not find a similar situation).
Discover if a sequence was called by another
Moderators: chulett, rschirm, roy
-
- Participant
- Posts: 54607
- Joined: Wed Oct 23, 2002 10:52 pm
- Location: Sydney, Australia
- Contact:
A Routine activity in which the routine invokes the DSGetJobInfo() function with DSJ.ME as the job handle and DSJ.JOBCONTROLLER as the InfoType argument should do this for you. If there is no controller this returns a zero-length string.
Or you could use a User Variable whose value is set via the equivalent DataStage macro (from memory DSJobController).
Or you could use a User Variable whose value is set via the equivalent DataStage macro (from memory DSJobController).
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.
Hmmm... not sure if there's an easier way, but the DSJobController macro (or DSGetJobInfo with the DSJ.JOBCONTROLLER InfoType) will give you the name of the controlling job. You could then take that job name to the repository and query for the job type.
-craig
"You can never have too many knives" -- Logan Nine Fingers
"You can never have too many knives" -- Logan Nine Fingers