How to force a job log being saved
Batch jobs running in the background finishing without errors leave no trace what exactly they have done unless an error occurred. Sometimes it's desirable to force a job log even when the job finished without error.
If a job log is created or not is determined by the job description being used when the job was started. Thus, you can either create or modify a job description for such jobs, or manually force the same parameters on the SBMJOB
command, or for an existing job with the CHGJOB
command.
Job descriptions and SBMJOB
know a three-part parameter called log:
- Level
- Severity
- Text.
Just forcing a job log can be done by adding
LOG(*JOBD *JOBD *SECLVL)
If this doesn't provide enough details, you can also use
LOG(4 0 *SECLVL) LOGCLPGM(*YES)
Job logs will be placed in the default printer queue, which are determined also by the job description's outq parameter.
Weblinks
- Forcing a Joblog for Batch Jobs, IBM.com