The following information gives suggestions to apply to using job
logs.
- To change the output queue for all jobs on the system, use the OUTQ or
DEV parameter on the Change Printer File (CHGPRTF) command
to change the file QSYS/QPJOBLOG. The following are two examples using each
of the parameters:
CHGPRTF FILE(QSYS/QPJOBLOG)
DEV (USRPRT)
or
CHGPRTF FILE(QSYS/QPJOBLOG)
OUTQ(USROUTQ)
- To change the QPJOBLOG printer file to use output queue QEZJOBLOG, use
the Operational Assistant cleanup function. When you want to use automatic
cleanup of the job logs, the printer files must be directed to this output
queue.
- To specify the output queue to which a job's job log is written, make
sure that file QPJOBLOG has OUTQ(*JOB) specified. You can use the OUTQ parameter
on any of the following commands: BCHJOB, CRTJOBD, CHGJOBD, or CHGJOB. The
following is an example:
CHGJOB OUTQ(*JOB)
If you change the default OUTQ at the beginning of the job,
all spooled files are affected. If you change it just before job completion,
only the job log is affected. You cannot use the Override with Printer
File (OVRPRTF) command to affect the job log.
- If the output queue for a job cannot be found, no job log is produced.
- To hold all job logs, specify HOLD(*YES) on the CHGPRTF command for the
file QSYS/QPJOBLOG. The job logs are then released to the writer when the Release
Spooled File (RLSSPLF) command is run. The following is an example:
CHGPRTF FILE(QSYS/QPJOBLOG)
HOLD(*YES)
- If the system abnormally ends, the start prompt allows the system operator
to specify whether the job logs are to be printed for any jobs that were active
at the time of the abnormal end.
- To delete a job log, use the Delete Spooled File (DLTSPLF) command
or the Delete option on the output queue display.
- If you used the USRDTA parameter on the Change Print File (CHGPRTF) command
to change the user data value for the QSYS/QPJOBLOG file, the value specified
will not be shown on the Work with Output Queue or Work with All Spooled Files
displays. The value shown in the user data column is the job name of the
job whose job log has printed.
- If job logs are being analyzed by programming technique, use the QMHCTLJL API
to direct the job log to the database file(s). The format of the records
in the database file is guaranteed while the printed format is not. If new
fields need to be added to a job log record, they are added at the end of
the record so existing programs will continue to work. Query features provided
by the system can be used directly on the files.