Page 1 of 1

Multiinstance subbatch calling multiinstance job

Posted: Wed Aug 19, 2009 4:18 pm
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

Posted: Wed Aug 19, 2009 4:34 pm
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)