Page 1 of 1
Routine that finds the JOB name that called it.
Posted: Tue Jul 06, 2010 11:30 am
by igorbmartins
Good afternoon my friends.
I did a routine that is invoked by several JOBS. Is there any way to set the routine for it to discover the name of the JOB that called it.
Anyone know how to do this?
Thanks
Posted: Tue Jul 06, 2010 11:40 am
by chulett
Can't check but off the top of my head, there should be a function to return the "controller" or "controlling" process, that should get you there.
Posted: Tue Jul 06, 2010 11:54 am
by anbu
First one returns the job name and second function call returns invocation id.
Code: Select all
vJobName = DSGETJobInfo (DSJ.ME, DSJ.JOBNAME)
vJobInvocationId = DSGETJobInfo (DSJ.ME, DSJ.JOBINVOCATIONID)
Posted: Tue Jul 06, 2010 12:24 pm
by igorbmartins
I tried to do this by following the codes above, but the job does not end. Neither can stop killing the job
Posted: Tue Jul 06, 2010 12:37 pm
by chulett
The "invocation id" is something else entirely. Please be precise about what exactly it is you tried so people can help.
Posted: Tue Jul 06, 2010 12:50 pm
by igorbmartins
Friends, the command indicated by the anbu was correct. My job gave error for other reasons.
Thanks all.