I am looking for agent variable for the CPU_MON job below to pass it to the successor TESTINT. I need to send the agent name for the job TESTCPMO to the job TESTINT. I am not able to find proper variable for the CPU_MON's agent.
APPL TESTCPMO SAF_PROF_APPL WAIT INTEGER VAR1, VAR2 CPU_MON TESTCPMO AGENT TESTAGENT /*CPU FROM(0) TO(10) OUTSIDE USED /*WAITMODE WAIT RUN NOW RELEASE TESTINT ENDJOB JOB TESTINT VAR1 = JOBDATA('TESTCPMO','AVAILABLE') VAR2 = WOBDATA('TESTCPMO/TESTCPMO.0','USED') CPSYS = JOBDATA('TESTCPMO','AGENT') SE 'VAR1 = %VAR1' SE 'VAR2 = %VAR2' SE 'CPSYS = %CPSYS' RUN NOW ENDJOB
There is no variable in the same application for agent name.
As a workaround, you may use ESP TAG:
CPU_MON TESTCPMOAGENT TESTAGENT
JOB TESTINT ....CPSYS = '%ESPAPTAG'...ENDJOB
The TAG statement worked for me. However, I had to define the tag at the application level. Thanks for your help!
Can we have a tag defined at the job level? This will help if we are sending multiple CPU_MON data to a single job in the application.
Yes, every job can have its own TAG statement.