15 pts.
 How to end a batch job in CLLE program?
I tried to end a batch job in CLLE by retreiving the job attributes through RTVJOBA and ENDJOB,but it doesn't work.Can anyone tell me what is the other procedure?

Software/Hardware used:
ASKED: September 3, 2008  6:10 AM
UPDATED: September 16, 2008  2:04 AM

Answer Wiki:
Here's a sample that works: PGM DCL VAR(&ENDSTS) TYPE(*CHAR) LEN(1) LOOP: RTVJOBA ENDSTS(&ENDSTS) IF COND(&ENDSTS = '1') THEN(RETURN) DLYJOB DLY(1) GOTO CMDLBL(LOOP) ENDPGM If this does not help you, please provide me with your source code.
Last Wiki Answer Submitted:  September 3, 2008  11:21 am  by  BillyBelgium   190 pts.
All Answer Wiki Contributors:  BillyBelgium   190 pts.
To see all answers submitted to the Answer Wiki: View Answer History.


Discuss This Question:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _


 

but my cl pgm is in a different job and the batch job is different,so RTVJOBA will not work as it gives the attributes of the current job only.So,if i want to end the batch job in a cl pgm what procedure should i follow?

 15 pts.

 

The only way you can end one job from another is if you know the full qualified name of the job you want to end: 999999/user/jobname. The only way to get that information is to either find it and enter it yourself or output WRKACTJOB to a spooled file and then parse the spooled file which only works if the actual (non-qualified) jobname is unique in the system.

 1,410 pts.