Troubleshooting
Problem
Document provides information on debugging a problem given the messages generated.
Resolving The Problem
An unexpected message is seen. What does it mean? Is the system clean?
A Primer on Message AnalysisQSYSOPR
Messages appear in many places. One of the most noticeable is the system operator's message queue (QSYSOPR) because it is often in break mode at the system console. QSYSOPR is where important messages are sent by programs of the operating system. Which messages constitute important was decided by the designers of the operating system, and the user cannot change what messages are reported there.
To look at QSYSOPR, on the operating system command line type the following:
WRKMSG QSYSOPR
Press the Enter key. A screen similar to the following is shown:
Display Messages System: KARNATH1 Queue . . . . . : QSYSOPR Program . . . . : *DSPMSG Library . . . : QSYS Library . . . : Severity . . . : 00 Delivery . . . : *BREAK Type reply (if required), press Enter. Cartridge does not exist Controller SHAHSRV contacted on line SITETRN. Controller SHAHSRV has disconnected. Controller SHAHSRV contacted on line SITETRN. Active subsystem description QCMN in QSYS changed. Device L34943490 in paused operational mode. Operational state change on device L34943490. CPF7302 received by CRTZOMBI at 300. (C D I R) Reply . . . _________________________________________________________ Operational state change on device L34943590. Controller SHAHSRV contacted on line SITETRN. Device L34943490 in automated operational mode. More... F3=Exit F11=Remove a message F12=Cancel F13=Remove all F16=Remove all except unanswered F24=More keys |
To see more information on the message about CRTZOMBI, put the cursor on that message and press PF1 (Help). A screen similar to the following is shown:
Additional Message Information Message ID . . . . . . : CPA0701 Severity . . . . . . . : 99 Message type . . . . . : Inquiry Date sent . . . . . . : 03/10/98 Time sent . . . . . . : 10:54:10 Message . . . . : CPF7302 received by CRTZOMBI at 300. (C D I R) Cause . . . . . : Control language (CL) program CRTZOMBI in library XZS2039 detected an error at statement number 300. Message text for CPF7302 is: File SHIELD not created in library ARMOR. Recovery . . . : This inquiry message can be avoided by changing the program. Monitor for the error (MONMSG command) and perform error recovery within the program. To continue, choose a reply value. Possible choices for replying to message . . . . . . . . . . . . . . . : C -- Cancel the CL program. D -- Dump the CL program variables and cancel the CL program. I -- Ignore the failing command. More... Type reply below, then press Enter. Reply . . . . ______________________________________________________________ F3=Exit F6=Print F9=Display message details F12=Cancel F21=Select assistance level |
The first important piece of information is the message ID. If you call a service provider for help, they will want to know this. The message text is duplicated, and additional information is given to help understand the message. This message is an Inquiry message (as it says near the top of the screen) which means that the message is expecting a reply. While the replies were shown in the message in the first screen (C D I R), they are explained here. The reply line is also presented again. The reply can be typed here or on the previous screen.
This particular message says that another message was encountered. Look at the job that sent this message to QSYSOPR to see the cause of the problem. To find the job, press PF9, Display message details. A screen similar to the following is shown:
Display Message Details Message ID . . . . . . : CPA0701 Severity . . . . . . . : 99 Date sent . . . . . . : 03/10/98 Time sent . . . . . . : 10:54:10 Message type . . . . . : Inquiry CCSID . . . . . . . . : 65535 From job . . . . . . . . . . . : URUK User . . . . . . . . . . . . : XZS2039 Number . . . . . . . . . . . : 131399 From program . . . . . . . . . : QCLXERR To message queue . . . . . . . : QSYSOPR Library . . . . . . . . . . : QSYS Bottom Press Enter to continue. F1=Help F3=Exit F12=Cancel |
This screen shows the job and program that issued the message to QSYSOPR. For more information on this problem, look at that job.
Active Joblog
Joblog refers to two things. While a job is active or running, it refers to a message queue associated with the job. This is also called the job's queue-space or job message queue. When sending program messages, send messages to queue *EXT, and the message goes to the joblog. After the job ends, the job message queue may be written to a spool file that has the name QPJOBLOG. This is printer or left in an output queue. Jobs may also have the logging level set to *NOLIST, and a joblog is not produced.
Since we never answered the message, this job is still active and is waiting for a reply. We can get to the joblog in several ways. On the operating system command line, type the following:
DSPJOBLOG nnnnnn/usrprf/jobname
where nnnnnn is the job number, usrprf is the user profile name, and jobname is the name of the job or the name of the device for interactive jobs. In this example, type the following:
DSPJOBLOG 131399/XZS2039/URUK
Another way to look at an active joblog is from a WRKJOB or DSPJOB screen. Give the qualified jobname as the parameter; for example, type one of the following:
WRKJOB 131399/XZS2039/URUK
DSPJOB 131399/XZS2039/URUK
A screen similar to the following is shown:
Display Job System: KARNATH1 Job: URUK User: XZS2039 Number: 131399 Select one of the following: 1. Display job status attributes 2. Display job definition attributes 3. Display job run attributes, if active 4. Display spooled files 10. Display job log, if active or on job queue 11. Display call stack, if active 12. Display locks, if active 13. Display library list, if active 14. Display open files, if active 15. Display file overrides, if active 16. Display commitment control status, if active More... Selection __ F3=Exit F12=Cancel |
This screen is also shown when you select Option 5 next to a job on the WRKACTJOB screen. From this screen, select Option 10, Display job log, if active or on job queue. If the job has ended, the joblog is not available from this option.
After selecting Option 10, a screen similar to the following is shown:
Display Job Log System: KARNATH1 Job . . : URUK User . . : XZS2039 Number . . . : 131399 >> CALL PGM(XZS2039/CRTZOMBI) Bottom Press Enter to continue. F3=Exit F5=Refresh F10=Display detailed messages F12=Cancel F16=Job menu F24=More keys |
Press F10 to see additional messages:
Display All Messages System: KARNATH1 Job . . : URUK User . . : XZS2039 Number . . . : 131399 >> CALL PGM(XZS2039/CRTZOMBI) 200 - DLYJOB DLY(100) 300 - CRTPF FILE(ARMOR/SHIELD) RCDLEN(133) Cannot find object needed for file SHIELD in ARMOR. File SHIELD not created in library ARMOR. Function check. CPF7302 unmonitored by CRTZOMBI at statement 300, instruction X'0010'. CPF7302 received by CRTZOMBI at 300. (C D I R) Bottom Press Enter to continue. F3=Exit F5=Refresh F12=Cancel F17=Top F18=Bottom |
The top line shows that you are looking at all the messages in the joblog. The line that starts with the two greater than symbols (>>) is a request. In this case, it is the command from the CMD parameter of the SBMJOB command that started this job. The lines immediately below it starting with numbers 200 and 300 are statements from the CRTZOMBI command language (CL) program. The numbers are the line numbers you would see in SEU. If the job was running with LOGCLPGM(*NO) specified or CRTZOMBI was not a CL program or was not observable, those messages would not be in the joblog. The last message is the message that is in QSYSOPR message queue waiting for a reply. We will look at this in a moment.
Above that is a Function Check message that says that another message was received, and the program was not expecting it. Note that the message ID, the program name (CRTZOMBI), and the statement number are given in this message. The statement number may not be available (in which case it is displayed as *N) if the program was unobservable. IBM programs are shipped unobservable.
The message ID in the function check is CPF7302. If you check the message directly above the function check message, you will find that this is message CPF7302. When you get help on that message (put the cursor on the message and press F1or Help) you will see it says the following:
Message . . . . : File SHIELD not created in library ARMOR. Cause . . . . . : The file was not created because of errors. Recovery . . . : See the error messages previously listed. Correct the errors, and then try the request again. |
This is not the ultimate cause of the problem. This is sometimes called a cascaded message (a message generated by another message). Exit by pressing the Enter key, point the cursor at the previous message, and press F1 or Help. A screen similar to the following is shown:
Additional Message Information Message ID . . . . . . : CPF3204 Severity . . . . . . . : 40 Message type . . . . . : Diagnostic Date sent . . . . . . : 03/11/98 Time sent . . . . . . : 11:07:06 Message . . . . : Cannot find object needed for file SHIELD in ARMOR. Cause . . . . . : Either library ARMOR or member *N or file *N in library *N was not found. If an add member operation was requested, the member is *N. Recovery . . . : Correct the name of the based-on file, the based-on member, the library name, or the format-sharing file. Then try the request again. If this was a restore of two or more libraries, then the library containing the based-on file may have been restored after library ARMOR. Try to restore file SHIELD again. Bottom Press Enter to continue. F3=Exit F6=Print F9=Display message details F12=Cancel F21=Select assistance level |
The message indicates that library ARMOR was not found. This message is used by the CRTPF (Create Physical File) command for several possible problems. Each involves some object needed for the command that is not available. Fields in the message that do not have values are replaced with *N. From this screen you can get even more information on where the error occurred in the program by using PF9, Display Message Details. The Message Details screen for this error is similar to the following:
Display Message Details Message ID . . . . . . : CPF3204 Severity . . . . . . . : 40 Date sent . . . . . . : 03/11/98 Time sent . . . . . . : 11:07:06 Message type . . . . . : Diagnostic CCSID . . . . . . . . : 65535 From program . . . . . . . . . : QDDCPF From library . . . . . . . . : QSYS Instruction . . . . . . . . : 03C1 To program . . . . . . . . . . : CRTZOMBI To library . . . . . . . . . : XZS2039 Instruction . . . . . . . . : 0010 Bottom Press Enter to continue. F1=Help F3=Exit F12=Cancel |
This shows what program actually sent the error message (QDDCPF - the operating system program that creates the physical file), what program the message was sent to (CRTZOMBI), and what Machine Instruction each of the programs were running at the time. If this was a COBOL, RPG, or C program, check the compile listing and find what source line corresponds to the instruction. If the problem occurred in an application or system program, the service provider usually wants this information. To exit from these screens, press the Enter key.
The final message to look at is the one that actually is waiting for a reply. Put the cursor on the last message, and press F1 or Help:
Additional Message Information Message ID . . . . . . : CPA0701 Severity . . . . . . . : 99 Message type . . . . . : Sender copy Date sent . . . . . . : 03/12/98 Time sent . . . . . . : 11:07:06 Message . . . . : CPF7302 received by CRTZOMBI at 300. (C D I R) Cause . . . . . : Control language (CL) program CRTZOMBI in library XZS2039 detected an error at statement number 300. Message text for CPF7302 is: File SHIELD not created in library ARMOR. Recovery . . . : This inquiry message can be avoided by changing the program. Monitor for the error (MONMSG command) and perform error recovery within the program. To continue, choose a reply value. Possible choices for replying to message . . . . . . . . . . . . . . . : C -- Cancel the CL program. D -- Dump the CL program variables and cancel the CL program. I -- Ignore the failing command. R -- Try the failing command again. Bottom Press Enter to continue. F3=Exit F6=Print F9=Display message details F12=Cancel F21=Select assistance level |
This message is CPA0701. It includes the message ID CPF7302 and the message text that is not the ultimate cause of the problem. Many people calling service providers do not realize that the message text (in this case, File SHIELD not created in library ARMOR) is not the message asking for a reply and is not the actual problem that must be fixed.
The message details follow:
Display Message Details Message ID . . . . . . : CPA0701 Severity . . . . . . . : 99 Date sent . . . . . . : 03/12/98 Time sent . . . . . . : 11:07:06 Message type . . . . . : Sender copy CCSID . . . . . . . . : 65535 From program . . . . . . . . . : QCLXERR From library . . . . . . . . : QSYS Instruction . . . . . . . . : 00D8 To program . . . . . . . . . . : QCLXERR To library . . . . . . . . . : QSYS Instruction . . . . . . . . : 00D8 |
The details may look unusual. The From and To programs are the same. This is the default error handler for CL programs; the message CPA0701 is the default error message from CL programs. This is the message that a CL program issues when it encounters a message that it is not expecting (for example, a message without a MONMSG statement). If the program is running interactively, the message is sent to the display screen. For batch jobs, the message is sent to QSYSOPR.
RPG, COBOL, and other compiled program also have default error handlers with messages that act like CPA0701.
Spooled Joblog
After a job ends, the joblog is written to a spool file. While the amount of information is controlled by the LOGGING LEVEL of the job, in the following examples a logging level of (4 0 *SECLVL) is used that produces the most output. Other logging levels produce joblogs that do not have the second-level text for the messages, do not have messages with severity codes lower than a specified value, or there might not be a joblog. For debugging purposes, more information is valuable.
After replying to the message with a C for cancel, the job ended, and a spoolfile called QPJOBLOG was created.
5769SS1 V4R1M0 970829 Job Log KARNATH1 03/26/98 11:23:34 Page 1 Job name . . . . : URUK User . . . . . . : XZS2039 Number . . . . . . . .: 160380 Job description. : QDFTJOBD Library . . . . . : QGPL MSGID TYPE SEV DATE TIME FROM PGM LIBRARY INST TO PGM LIBRARY INST CPF1124 Information 00 03/26/98 11:23:33 QWTPIIPP QSYS 053D *EXT *N Message . . . . : Job 160380/XZS2039/URUK started on 03/26/98 at 11:23:33 in subsystem QBATCH in QSYS. Job entered system on 03/26/98 at 11:23:33. CPI1125 Information 00 03/26/98 11:23:33 QWTPIIPP QSYS 0259 *EXT *N Message . . . . : Job 160380/XZS2039/URUK submitted. Cause . . . . . : Job 160380/XZS2039/URUK submitted to job queue QBATCH in QGPL from job 160214/XZS2039/QPADEV0182. Job 160380/XZS2039/URUK was started using the Submit Job (SBMJOB) command with the following job attributes: JOBPTY(5) OUTPTY(5) PRTTXT() RTGDTA(QCMDB) SYSLIBL(SST QSYS QSYS2 QHLPSYS QUSRSYS SECLIBV3R1 VLOGTOOL3) CURLIB(XZS2039) INLLIBL(V2KEA119 QGPL QTEMP NEVLING QSVCDRCTR QMPGDATA) LOG(4 00 *SECLVL) LOGCLPGM(*YES) INQMSGRPY(*RQD) OUTQ(XZS2039/XZS2039) PRTDEV(PRT01) HOLD(*NO) DATE(*SYSVAL) SWS(00000000) MSGQ(QUSRSYS/XZS2039) CCSID(37) SRTSEQ(*N/*HEX) LANGID(ENU) CNTRYID(US). *NONE Request 03/26/98 11:28:03 QWTSCSBJ *N QCMD QSYS 0142 Message . . . . : -CALL PGM(XZS2039/CRTZOMBI) *NONE Command 03/26/98 11:28:03 QCADRV QSYS 0186 CRTZOMBI XZS2039 000C Message . . . . : 200 - DLYJOB DLY(100) *NONE Command 03/26/98 11:29:43 QCADRV QSYS 0186 CRTZOMBI XZS2039 0010 Message . . . . : 300 - CRTPF FILE(ARMOR/SHIELD) RCDLEN(133) CPF3204 Diagnostic 40 03/26/98 11:29:43 QDDCPF QSYS 03C1 CRTZOMBI XZS2039 0010 Message . . . . : Cannot find object needed for file SHIELD in ARMOR. Cause . . . . . : Either library ARMOR or member *N or file *N in library *N was not found. If an add member operation was requested, the member is *N. Recovery . . . : Correct the name of the based-on file, the based-on member, the library name, or the format-sharing file. Then try the request again. If this was a restore of two or more libraries, then the library containing the based-on file may have been restored after library ARMOR. Try to restore file SHIELD again. CPF7302 Escape 40 03/26/98 11:29:43 QDDCPF QSYS 043F CRTZOMBI XZS2039 0010 Message . . . . : File SHIELD not created in library ARMOR. Cause . . . . . : The file was not created because of errors. Recovery . . . : See the error messages previously listed. Correct the errors, and then try the request again. CPA0701 Sender copy 99 03/26/98 11:29:43 QCLXERR QSYS 00D8 QCLXERR QSYS 00D8 Message . . . . : CPF7302 received by CRTZOMBI at 300. (C D I R) Cause . . . . . : Control language (CL) program CRTZOMBI in library XZS2039 detected an error at statement number 300. Message text for CPF7302 is: File SHIELD not created in library ARMOR. Recovery . . . : This inquiry message can be avoided by changing the program. Monitor for the error MONMSG command) and perform error recovery within the program. To continue, choose a reply value. Possible choices for replying to message . . . . . . . . . . . . . . . : C -- Cancel the CL program. D -- Dump the CL program variables and cancel the CL program. I -- Ignore the failing command. R -- Try the failing command again. *NONE Reply 03/26/98 15:23:26 QMHSCLVL QSYS 04DD QCLXERR QSYS 00E5 Message . . . . : C CPF9999 Escape 40 03/26/98 11:29:43 QMHUNMSG *N QCMD QSYS 016E Message . . . . : Function check. CPF7302 unmonitored by CRTZOMBI at statement 300, instruction X'0010'. Cause . . . . . : An escape exception message was sent to a program which did not monitor for that message. The full name of the program to which the |
5769SS1 V4R1M0 970829 Job Log KARNATH1 03/26/98 11:23:34 Page 2 Job name . . . . : URUK User . . . . . . : XZS2039 Number . . . . . . . .: 160380 Job description. : QDFTJOBD Library . . . . . : QGPL MSGID TYPE SEV DATE TIME FROM PGM LIBRARY INST TO PGM LIBRARY INST unmonitored message was sent is CRTZOMBI . At the time the message was sent the program was stopped at higher level language statement number(s) 300. If more than one statement number is shown, the program was a bound program. Optimization does not allow a single statement number to be determined. If *N is shown as a value, it means the actual value was not available. Recovery . . . : See the low level messages previously listed to locate the cause of the function check. Correct any errors, and then try the request again. CPC2402 Completion 50 03/26/98 15:23:27 QCMD QSYS 050C *EXT *N Message . . . . : Job ended. Cancel message received at command processor. Cause . . . . . : A message with a severity equal to or exceeding the end severity was received at the command processor. Recovery . . . : See the messages previously listed to determine the message that caused the job to be ended. Correct the errors, and then try the request again. CPF1164 Completion 00 03/26/98 15:23:27 QWTMCEOJ QSYS 0212 *EXT *N Message . . . . : Job 160392/XZS2039/URUK ended on 03/26/98 at 15:23:27; 1 seconds used; end code 20 . Cause . . . . . : Job 160392/XZS2039/URUK completed on 03/26/98 at 15:23:27 after it used 1 seconds processing unit time. The job had ending code 20. The job ended after 1 routing steps with a secondary ending code of 0. The job ending codes and their meanings are as follows: 0 - The job completed normally. 10 - The job completed normally during controlled ending or controlled subsystem ending. 20 - The job exceeded end severity (ENDSEV job attribute). 30 - The job ended abnormally. 40 - The job ended before becoming active. 50 - The job ended while the job was active. 60 - The subsystem ended abnormally while the job was active. 70 - The system ended abnormally while the job was active. 80 - The job ended (ENDJOBABN command). 90 - The job was forced to end after the time limit ended (ENDJOBABN command). Recovery . . . : For more information, see the Work Management book, SC41-5306. |
Note: The formatting has been modified slightly to reduce the width of the lines. A joblog is 133 columns wide.)
On the first line, in the upper left is the string 5769SS1 V4R1M0 970829. The only interesting part of this is the release number, Version 4, Release 1, Mod 0. All joblogs have this. Therefore, if you are unsure of what release your system is at, check a printed joblog.
The job name, user, and number is near the top of each page of the joblog. Also included is the job description, which is useful if you decide to change some of the job parameters for the next run.
The message ID is in the first column. On the same line as the message ID are the From and To programs. If the To program is *EXT, the message was sent to the job message queue rather than to a program.
Message CPF1124 is the program start message. All jobs have that message.
Message CPI1125 contains the parameters in effect when the job was started. This message is generated by Batch jobs. Useful information in this message includes the job queue, the routing data, and the initial library list the job started with.
Message CPF1164 is the program ended message. All jobs except a few system jobs have this message as the last message in the joblog. The end code is useful for seeing how the job ran.
Messages listed as Type Request (the second column after the message ID) are from the Command parameter of the SBMJOB command or from a CL program the job is running (as long as the program is observable and the job is running with the parameter value of LOGCLPGM(*YES) specified. This can be seen in the CPI1125 message. The lines that are commands from CL programs include the line number from the source (for example, "Message . . . . : 200 - DLYJOB DLY(100) showing that the DLYJOB(100) command was at source statement 200).
The response to the inquiry message is also listed as a Request. This gives you a record of what the answer was.
QHST
QHST (pronounced Q Hist) or the History Log is another place to look for messages. It is, however, less useful in many situations than the joblog.
QHST is a unique log. Messages are sent to it like a normal message queue. However, when you display them, they are copied into a file, and the file is displayed. While any application can send messages to message queue QHST, the operating system designers decided what messages would be logged there, and what messages are logged there by operating system programs cannot be changed.
To look at the history log, use the DSPLOG command. A screen similar to the following is shown:
Display History Log Contents Job 169296/QPM400/Q1PDR started on 04/03/98 at 14:00:03 in subsystem Q1PGSCH Job JIM was not submitted. Reason is 02. Controller P000437 contacted on line SITETRN. Job 169298/QIJS/QIJSCCC started on 04/03/98 at 14:01:00 in subsystem QSYSWRK Job 169298/QIJS/QIJSCCC ended on 04/03/98 at 14:01:00; 1 seconds used; end co Job 169584/XZY2475/QPADEV0199 started on 04/03/98 at 14:16:33 in subsystem QI CPF7302 received by CRTZOMBI at 300. (C D I R) C Job 169455/XZS2039/URUK ended on 04/03/98 at 14:16:58; 1 seconds used; end co Controller SHAHSRV contacted on line SITETRN. Job 169301/QPGMR/QPFRMON started on 04/03/98 at 14:18:06 in subsystem Q1PGSCH Controller SHAHSRV contacted on line SITETRN. More... Press Enter to continue. F3=Exit F10=Display all F12=Cancel |
If you point the cursor at a message and press F1 or the Help key, you see the second-level text like you would for a job message queue or the operator's message queue.
One of the lines in the history log says C. This line is the response to the message directly above it. If you put the cursor on the line and press F1, a screen similar to the following is shown:
Additional Message Information From . . . . . . . . . : XZS2039 Severity . . . . . . . : 99 Message type . . . . . : Valid reply Date sent . . . . . . : 04/03/98 Time sent . . . . . . : 14:16:57 Message . . . . : C Bottom Press Enter to continue. F3=Exit F6=Print F9=Display message details F12=Cancel F21=Select assistance level |
Select F9 More Details from that screen. A screen similar to the following is shown:
Display Message Details From . . . . . . . . . : XZS2039 Severity . . . . . . . : 99 Date sent . . . . . . : 04/03/98 Time sent . . . . . . : 14:16:57 Message type . . . . . : Valid reply CCSID . . . . . . . . : 65535 From job . . . . . . . . . . . : QPADEV0182 User . . . . . . . . . . . . : XZS2039 Number . . . . . . . . . . . : 169379 Bottom Press Enter to continue. F1=Help F3=Exit F12=Cancel |
which is much like the details available from QSYSOPR, pointing to the job that sent the message to the history log. In this case, it shows the job (and the user ID) that answered the message. Therefore, if a message is answered and you want to know who actually answered it, this is the way to find it.
The default parameters for DSPLOG are:
Display Log (DSPLOG) Type choices, press Enter. Log . . . . . . . . . . . . . . QHST QHST Time period for log output: Start time and date: Beginning time . . . . . . . . *AVAIL Time, *AVAIL Beginning date . . . . . . . . *CURRENT Date, *CURRENT, *BEGIN End time and date: Ending time . . . . . . . . . *AVAIL Time, *AVAIL Ending date . . . . . . . . . *CURRENT Date, *CURRENT, *END Output . . . . . . . . . . . . . * *, *PRINT, *PRTWRAP Bottom F3=Exit F4=Prompt F5=Refresh F10=Additional parameters F12=Cancel F13=How to use this display F24=More keys |
Press F10 and page down to show additional parameters.
Display Log (DSPLOG) Type choices, press Enter. Additional Parameters Jobs to display . . . . . . . . *NONE Name, *NONE User . . . . . . . . . . . . . Name Number . . . . . . . . . . . . 000000-999999 + for more values Message identifier . . . . . . . *ALL Name, *ALL + for more values Bottom F3=Exit F4=Prompt F5=Refresh F12=Cancel F13=How to use this display F24=More keys |
Note: The default for displaying the log is to display only the information for today. To look at the history log for previous days, the date parameters must be changed.
The Additional Parameters are useful for limiting the amount of data presented. Continuing with the example job presented before, to see all the messages in QHST for the job, on the operating system command line type the following:
DSPLOG JOB(169455/XZS2039/URUK)
Press the Enter key. A screen similar to the following is shown:
Display History Log Contents Job 169455/XZS2039/URUK started on 04/03/98 at 10:00:21 in subsystem QBATCH i CPF7302 received by CRTZOMBI at 300. (C D I R) CPF7302 received by CRTZOMBI at 300. (C D I R) Job 169455/XZS2039/URUK ended on 04/03/98 at 14:16:58; 1 seconds used; end co Bottom Press Enter to continue. F3=Exit F10=Display all F12=Cancel |
The messages are truncated at 80 characters; therefore, using OUTPUT(*PRINT) is often useful.
CPF1124 and CPF1164 (job starting and job ending) messages are put in the history log so every job has a record of its existence there. The only other message from this job that made it to the history log was the CPA0701 message. It shows up two times--once when it is issued, and once when it is answered. The answer is not on this printout because another job answered it.
The printed format of the history log looks different. Here is the output from the following command:
DSPLOG JOB(169455/XZS2039/URUK) OUTPUT(*PRINT)
5769SS1 V4R1M0 970829 History Log Page 0001 MSGID SEV MSG TYPE CPF1124 00 INFO Job 169455/XZS2039/URUK started on 04/03/98 at 10:00:21 in subsystem QBATCH in QSYS URUK XZS2039 169455 04/03/98 10:00:22 CPA0701 99 INQUIRY CPF7302 received by CRTZOMBI at 300. (C D I R) URUK XZS2039 169455 04/03/98 10:02:02 CPA0701 99 INQUIRY CPF7302 received by CRTZOMBI at 300. (C D I R) URUK XZS2039 169455 04/03/98 14:16:57 CPF1164 00 COMPLETION Job 169455/XZS2039/URUK ended on 04/03/98 at 14:16:58; 1 seconds used; end code 20 URUK XZS2039 169455 04/03/98 14:16:58 |
After each line of the printed version of the History Log is the name of the job that put the message in the log and the date and time that message went into the log. In this example, all the messages came from the same job.
The History log is not very useful for debugging user jobs. The messages in it are more likely to be about the state of the system. For initial debugging, the joblog is the best tool.
Finding a Spooled Joblog
After a job ends and the joblog is written to a spool file, how do you find it? There are numerous ways, but they work only if the joblog is still on the system. If the file has been deleted or printed (which causes it to be deleted afterward), the joblog is not found.
If you know the name of the user whose joblog you are searching for, you can look at all the spooled files the user has created using the Work with Spooled Files command. On the operating system command line, type the following:
WRKSPLF username
Press the Enter key. A list of spool files similar to the following is shown:
Work with Printer Output System: KARNATH1 User . . . . . . XZS2039 Name, *ALL, F4 for list Type options below, then press Enter. To work with printers, press F22. 2=Change 3=Hold 4=Delete 5=Display 6=Release 7=Message 9=Work with printing status 10=Start printing 11=Restart printing Printer/ Opt Output Status Not Assigned _ GOTOMSGW Not assigned to printer (use Opt 10) _ CRTZOMBI Not assigned to printer (use Opt 10) Bottom F1=Help F3=Exit F5=Refresh F6=Completed printer output F11=Dates/pages/forms F20=Include system output F24=More keys |
This is what WRKSPLF presents in *BASIC assistance mode. It does not show joblogs or other system output. To see joblogs, press PF20 to include system output or press PF21 to change to *INTERMED (intermediate) assistance. All the example screens in this document were at *INTERMED assistance level. The WRKSPLF screen at intermediate assistance looks similar to the following:
Work with All Spooled Files Type options, press Enter. 1=Send 2=Change 3=Hold 4=Delete 5=Display 6=Release 7=Messages 8=Attributes 9=Work with printing status Device or Total Cur Opt File User Queue User Data Sts Pages Page Copy _ GOTOMSGW XZS2039 XZS2039 RDY 3 1 _ CRTZOMBI XZS2039 XZS2039 RDY 3 1 _ QPJOBLOG XZS2039 QEZJOBLOG QPADEV0177 RDY 95 1 _ QPJOBLOG XZS2039 QEZJOBLOG QPADEV0177 RDY 2 1 _ QPJOBLOG XZS2039 QEZJOBLOG QPADEV0199 RDY 2 1 _ QPJOBLOG XZS2039 QEZJOBLOG URUK RDY 2 1 _ QPJOBLOG XZS2039 QEZJOBLOG QPADEV0108 RDY 3 1 _ QPJOBLOG XZS2039 QEZJOBLOG QPADEV0070 RDY 3 1 Bottom Parameters for options 1, 2, 3 or command ===> ________________________________________________________________ F3=Exit F10=View 3 F11=View 2 F12=Cancel F22=Printers F24=More keys |
Then, to view the joblog, just type 5 next to the file.
Another way to find a joblog is from a display job or work with job (DSPJOB or WRKJOB) command screen (like the one presented in the section on Active Joblogs). To get to one of those screens, use one of the commands with the qualified job name; for example:
DSPJOB 131399/XZS2039/URUK
Or, type the simple job name (DSPJOB URUK). Using just the name gets you a selection screen that lists all the jobs with that name. A selection screen looks similar to the following:
Select Job KARNATH1 03/13/98 17:13:27 Type option, press Enter. 1=Select Entered Option Job User Number Type -----Status----- System _ URUK XZS2039 133002 BATCH OUTQ 03/12/98 _ URUK XZS2039 131399 BATCH OUTQ 03/10/98 Bottom F3=Exit F12=Cancel Duplicate jobs found. |
Type 1 next to the job that you want to display. You get to the DSPJOB menu screen that has been presented several times.
Other ways to get information about jobs are the WRKUSRJOB and WRKSBMJOB (work with user job and work with submitted job) commands. Each of those commands presents you with a list of jobs with options to work with them (which invokes the WRKJOB command) or you can go directly to the list of spooled files generated by the job (skipping the step of selecting the option to work with the job and selecting Option 4 to work with spooled output).
Other ways to get to the information on a specific job are the Work with Active Jobs (WRKACTJOB) and the Work with Subsystem Jobs (WRKSBSJOB) command. From those lists of jobs, take an option to work with the job.
[{"Type":"MASTER","Line of Business":{"code":"LOB57","label":"Power"},"Business Unit":{"code":"BU058","label":"IBM Infrastructure w\/TPS"},"Product":{"code":"SWG60","label":"IBM i"},"Platform":[{"code":"PF012","label":"IBM i"}],"Version":"7.1.0"}]
Historical Number
11873955
Was this topic helpful?
Document Information
Modified date:
18 December 2019
UID
nas8N1018358