Manage job logs
Most jobs on your iSeries™ have a job log associated with it. Job logs
tell you many different things such as when the job starts, when the job ends,
what commands are running, failure notices and error messages. This information
gives you a good idea of how the job cycle is running.
The following information discusses the various tasks that you can perform
when working with job logs.
- Manage the job log server
The QSYSWRK subsystem controls the job log server. However, there are some tasks that you can perform to customize or manage the job log server.
- Start the job log server
By default, the job log server automatically starts when the QSYSWRK
subsystem starts. You can manually start a job log server by using the Start
Job Log Server (STRLOGSVR) command.
- How to display job logs
You can see a job log from any place within work management that
you access jobs, such as through the Subsystem area or the Memory Pool area.
You can use iSeries Navigator
or the character-based interface to display job logs.
- What to do when the job log won't display
In iSeries Navigator,
to find and display a job log, whether a batch job or an interactive job,
right-click the job and then click Job log from the
menu. However, depending upon the status of your job or how the job log values
were set in the job description, your job log may be in the output queue,
or it may be in a job log pending status or it may not be available.
- Specify the output queue for a job log
By default the printer file that is used to spool a job log is QPJOBLOG. You can have multiple QPJOBLOG printer files on your system. In QSYS the output queue that the OUTQ attribute uses is QEZJOBLOG, in library QUSRSYS. When the system creates a job log, it looks for the printer file QPJOBLOG in the job's library list. The first one that is found is the one that it uses. You use the character-based interface to adjust these settings.
- Stop production of a specific job log
If you only want to stop the production of a particular job log,
do not use the End Job Log Server (ENDLOGSVR)
command. The ENDLOGSVR command ends all job log servers
which results in stopping the production of all job logs.
- Prevent the production of a job log
Preventing the production of a job log is useful if you already
know that you will not need the job log and you want to conserve system resources.
When you specify that you do not want to produce a job log, the job log will
not be produced and remains in pending until removed either by the Remove
Pending Job Log (QWTRMVJL) command or the End Job (ENDJOB)
command.
- Control information in a job log
When working with problems, you might want to record the maximum amount of information for jobs that have frequent problems. Alternatively, you might not want to create a job log for jobs that completed normally. Or you might want to exclude informational messages.
- Delete job log output files
Job logs are removed from the system when a job completes normally,
or when the Remove Pending Job Log (QWTRMVJL) API or the End Job (ENDJOB)
command is issued. Additionally if "clear incomplete job logs" is specified
on the IPL, all of the jobs in job log pending will be removed from the system
during an IPL. Any remaining job log output files can be found under
- Produce printer output from job log pending
Jobs that do not have the iSeries Navigator Job Properties
- Job Log setting, Produce a job log field
selected do not produce job logs. Instead the job log is in job log pending.
To produce printer output from a job log that is in job log pending,
use the character-based interface.
- Clean up job log pending
There are a few ways to clean up, or remove jobs from job log pending.
You can end the job with a value of 0 for the Maximum log entries (LOGLMT)
parameter. If the job is already ended, you can run the Remove Pending Job
Log (QWTRMVJL) API. You can also use the Work with Job Logs (WRKJOBLOG)
command.