Search code examples
ibm-midrange

CHGJOB - so that all CL commands are logged to spool file?


I would like to run a CL program that does a bunch of CPYF and deletes. I would like to have a log file of all commands even those that are successful.

I thought that running CHGJOB in the CL before CL call would do this, but it does not work. No log is created.

CHGJOB   LOG(1 1 *MSG) LOGCLPGM(*YES)    

Solution

  • CHGJOB LOG(4 0 *SECLVL) LOGCLPGM(*YES)

    Turns on maximum logging..

    Is this a batch job or interactive?

    If interactive, you probably need to SIGNOFF LOG(*LIST) for the system to keep the log after signoff.