All jobs have a log in which the system records what the user is doing (the commands entered) and practically all the messages the
You can display your own jobs job log using the Display Job Log (DSPJOBLOG) command. You dont need to supply any parameters. The Display Job Log screen gives you an instant history listing of everything you have done since you signed on. This command allows you to go back and examine what you did and reread messages you may have missed. Figure 3.7 shows an example of the Display Job Log panel.
From this panel, press
to display all the messages that have been recorded, not just the
You also can display someone elses job log if you have sufficient authority (such as *JOBCTL). Just access the job you are interested in with any of the WRKXXXJOB commands, enter an option 5 to display the job, press Enter , and select the right option from the menu presented. You can do this for any job in the system, whether it is interactive, batch, communications, or spool.
The Display Job Log panel lets you roll back and forth to display a number of messages at a time. These messages cannot be removed. You can display full information by positioning the cursor at the message line and pressing the
to include all detailed messages,
to go directly to the beginning of the job log, and
to go to the end. F5 updates the job log panel, which includes new messages and entries that may have occurred after you
Although you can force the system to print the job log whenever jobs end (whether normally or in error), you probably will not want to, because you would soon have dozens (or hundreds) of printed job logs, some of which can be hundreds of pages long.
To control the printing of the job log, use the Change Job (CHGJOB) command to change the log parameters value. A value such as (4 00 *NOLIST) ensures that job logs are printed only if the job ends abnormally. If you always want a job log, set the value to (4 00 *MSG) or (4 00 *SECLVL). The difference between these two values is that *SECLVL also prints the
You set the log parameter at the job description level using the Change Job Description (CHGJOBD) command. Job descriptions are described in detail in Chapter 11.
The System Log, QHST
The i5 also provides a system-wide log called
QHST. QHST records events in this log, which provides a history of
system activity. (The system log gives very little information,
because most of that information is recorded in job logs. Both the
system log and the job logs are not adequate means to keep track of
how much each
The Display Log (DSPLOG) command displays or prints the system log. You can provide some selection through parameters and, as with job logs, display complete information for the messages recorded in the log by positioning the cursor and pressing Help or F1. The system log panel is shown in Figure 3.9.
The system log is a message queue object (*MSGQ); you can write to the system log directly with the Send Message (SNDMSG) command and supply TOMSGQ(QHST). For example:
SNDMSG MSG('Security violation at display station DSP13.') TOMSGQ(QHST)
QHST has a fixed
Operational Assistant (see Chapter 7) can help you keep old system logs under control.