280 pts.
 Ending a job through CLP
I am trying to end a job using ENDJOB command from a CL program submitted to batch, but this does not end the intended program and emits an error some kind meaning "Not allowed". I made user that the profile has enough preveliges. Any idea how to end a job through batch?

Software/Hardware used:
AS400
ASKED: December 16, 2009  8:23 AM
UPDATED: December 16, 2009  7:17 PM

Answer Wiki:
Try putting rtvjoba &number &user &job in the job you want to end and write the results to a dtaara. Then have your endjob CLP retrieve the job attributes and issue the endjob with parrms changed to the retrieved values. *********** In your saying that the profile has enough privileges, please provide more detail, with exactly what authorities the profile has. It sounds like the profile that the submitted job is running under is different from the job that it's trying to cancel, and the submitted job's profile doesn't have *JOBCTL authority CWC ****************
Last Wiki Answer Submitted:  December 16, 2009  3:44 pm  by  Cwc   4,275 pts.
All Answer Wiki Contributors:  Cwc   4,275 pts. , DanD   2,865 pts.
To see all answers submitted to the Answer Wiki: View Answer History.


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


 

There are three general reasons for the words ‘not allowed’ to show up in a message out of ENDJOB — CPF1341, CPF1342 and CPF135D.

The first two seem unlikely, but it’s hard to tell because the situation isn’t described in sufficient detail.

CPF135D would seem to be the likely message. And if that’s true, did you read the extended text of the message? (Do you know that extended help is available?) If so, did you follow the ‘Recovery’ instructions?

If that’s not the correct message ID, what was it?

Tom

 108,215 pts.