All jobs have a log in which the system records what the user is doing (the commands entered) and practically all the messages the user sees on the screen for whatever reason. This facility is called the job log.
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.
Figure 3.7: Example of the Display Job Log (DSPJOBLOG) command.
From this panel, press F10 to display all the messages that have been recorded, not just the requests you have entered. Figure 3.8 shows this panel.
Figure 3.8: Example of detailed messages in the Display Job Log (DSPJOBLOG) command.
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 Help or F1 key. Press F10 to include all detailed messages, F17 to go directly to the beginning of the job log, and F18 to go to the end. F5 updates the job log panel, which includes new messages and entries that may have occurred after you began displaying the job log.
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.
Job logs are always printed when a job ends abnormally. Forexample, if you submit a job that prints a customer master listing to batch, but the program cannot find the customer master file, the job ends abnormally and the system prints a job log. If you sign on to a display station and the system operator cancels your job; the job will end abnormally, which causes a printed job log.
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 second-level text for every message. *SECLVL provides text that can mean the difference between understanding and not understanding why the job ran into trouble. However, *SECLVL also causes considerably longer job logs. If you dont need that much information, consider using *MSG instead of *SECLVL.
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.