Multiinstance subbatch calling multiinstance job

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
dsrules
Premium Member
Premium Member
Posts: 76
Joined: Sun Nov 28, 2004 8:56 pm

Multiinstance subbatch calling multiinstance job

Post by dsrules »

Hi
I am trying to call a multi instance job with the same invocation Id used to run the calling multi instance sub - batch job.
while calling the job from sub batch I tried to use the code

Code: Select all

hJob10 = DSAttachJob("EOA1010LdIncidentTable.DSJobInvocationId", DSJ.ERRFATAL)
      If NOT(hJob10) Then
         Call DSLogFatal("Job Attach Failed: EOA1010LdIncidentTable.DSJobInvocationId", "JobControl")
But this runs the job with invocation id 'DSJobInvocationId' rather than using the actual value of DSJobInvocationId.
Is there some way I can achieve this
example : sub-batch ran with invocation id ABC,I want the job also be run with the invocation id ABC.

Thanks
______________________________________
"Everytime I close the door on reality, it comes in through the windows." - Jennifer Yane
chulett
Charter Member
Charter Member
Posts: 43085
Joined: Tue Nov 12, 2002 4:34 pm
Location: Denver, CO

Post by chulett »

That's because what you have is a literal string: "EOA1010LdIncidentTable.DSJobInvocationId" so it uses that rather than realize there is a macro locked inside the quotes prison. Not saying this will solve all of your problems but try:

Code: Select all

hJob10 = DSAttachJob("EOA1010LdIncidentTable.":DSJobInvocationId, DSJ.ERRFATAL)
-craig

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