IBM Support

Finding Job Logs

Troubleshooting


Problem

This document addresses how to find job logs, and it supplies helpful information for understanding job logs.

Resolving The Problem

There are a couple commands to choose from. If you know exactly what job log you are looking for, run one of the following commands:

DSPJOBLOG job#/user/jobname

or

DSPJOB job#/user/jobname

The DSPJOB command will allow you to display that job in OUTQ, JOBQ, or active status.

If you know only the user ID of the job log you want to find, issue the following command:

WRKUSRJOB user id

The WRKUSRJOB command will show you all jobs in JOBQ, OUTQ, or active status submitted under that user ID.

If you know the name the job runs under, issue the following command:

WRKJOB job name (WRKJOB QSTRUPJD)

The WRKJOB command will allow you to work with all jobs that run under that job name which are active, sitting in a JOBQ or in an OUTQ.

If the job log does not contain enough information, or is not even being generated, check how the logging level in the job description is set up. This can be found on the user profile submitting the job. To get the most information you can in a job log, we suggest you set the parameters to the following:

Message logging:                                              
 Level  . . . . . . . . . . . . . . . . . . . . :   4        
 Severity . . . . . . . . . . . . . . . . . . . :   0        
 Text . . . . . . . . . . . . . . . . . . . . . :   *SECLVL  
Log CL program commands  . . . . . . . . . . . . :   *YES    



Keep in mind that if you change these parameters, job logs will start being produced for every job that runs under that job description, even the ones that end normally. This can cause unnecessary print jobs to active writers or fill up OUTQs quickly. So, you may want to check and possibly change the OUTQ that the job logs will get routed to. One recommendation is to send them to the QEZJOBLOG OUTQ. To do this, change the QPJOBLOG print file to direct it to that OUTQ with the CHGPRTF QPJOBLOG command. The parameters you want to look for are hidden deep into the file description. You may have to page down five times to get to the following fields:
 
                        Change Printer File (CHGPRTF)                        
                                                                             
Type choices, press Enter.                                                    
                                                                             
Spool the data . . . . . . . . .   *YES          *SAME, *YES, *NO              
Spooled output queue . . . . . .   QEZJOBLOG     Name, *SAME, *JOB, *DEV      
 Library  . . . . . . . . . . .     QUSRSYS     Name, *LIBL, *CURLIB          
Form type  . . . . . . . . . . .   *STD          Character value, *SAME, *STD  
Copies . . . . . . . . . . . . .   1             1-255, *SAME    
   

Then, set up the GO CLEANUP menu to automatically clear that OUTQ of job logs after determining the number of days you wish to keep them on the system.

Let us take a tour through a job log......

   Job:   QTGTELNETS    User . . :   QTCP          Number . . . :   104878  
                                                                             
* Job 104878/QTCP/QTGTELNETS started on 06/18/98 at 09:33:32 in subsystem    
  QSYSWRK in QSYS.* Job entered system on 06/18/98 at 09:33:32.            
  Job 104878/QTCP/QTGTELNETS submitted.                                      
   Library QGPL added to library list.                                        
   Vary on completed for device QPADEV0363.                                  



Every job on the operating system starts with the CPF1124 message. We can see the additional information by pressing F1 in the job log on the first message:

Message ID . . . . . . :   CPF1124       Severity . . . . . . . :   00        
Message type . . . . . :   Information                                        
Date sent  . . . . . . :   06/18/98      Time sent  . . . . . . :   09:33:32  
                                                                             
Message . . . . :   Job 104878/QTCP/QTGTELNETS started on 06/18/98 at 09:33:32
 in subsystem QSYSWRK in QSYS. Job entered system on 06/18/98 at 09:33:32.


This brings up one very common misconception. All this means is that the job was submitted successfully in subsystem QSYSWRK for user QTCP. It does not mean the job actually processed anything, but that the routing step to submit the job to a subsystem did not run into any errors entering the subsystem. If the job submits and completes within seconds or ends abnormally, you would want to work with the fully qualified job name listed in the job log to find out any other errors that occurred. Quite often, we have programs/commands that run under a different user profile to ensure proper authority. For an example of this, issue the STRHOSTSVR command.


 Job . . :   QPADEV0020    User . . :   XZY3226       Number . . . :   032060  
                                                                               
    Routing entry sequence number 2539 already exists.                        
    Compare value conflicts with routing entry 2539.                          
    Job 032068/QUSER/QZRCSRVSD submitted to job queue QSYSNOMAX in library    
      QSYS.                                                                    
    Start of prestart jobs in progress.                                        
    Routing entry sequence number 2540 already exists.                        
    Compare value conflicts with routing entry 2540.                          
    Job 032070/QUSER/QZSOSGND submitted to job queue QSYSNOMAX in library      
      QSYS.                                                                    
    Start Prestart Jobs command is not allowed now.                            

     Routing entry sequence number 200 already exists.                          
    Compare value conflicts with routing entry 200.                            
    Job 032071/QUSER/QPWFSERVSD submitted to job queue QPWFSERVER in library  
      QSYS.                  
                               

If we wanted to work with the job associated with the host server command, we would write down the information from our job log for the Job 032071/QUSER/QPWFSERVSD.

Issue a WRKJOB JOB(032071/QUSER/QPWFSERVSD) and you will see:

 Job . . :   QPWFSERVSD    User . . :   QUSER         Number . . . :   032071  
                                                                               
  >                                                                            
    Job 032071/QUSER/QPWFSERVSD started on 06/23/98 at 09:18:40 in subsystem  
      QSERVER in QSYS. Job entered system on 06/23/98 at 09:18:38.            
    Job 032071/QUSER/QPWFSERVSD submitted.                                    
    The protocol required to support the specified address family is not      
      available at this time.                                                  
    HOST SERVER COMMUNICATIONS ERROR OCCURRED ON SOCKET - SPX FAMILY.        


Back to our job log.....when trying to locate what JOBQ a job was submitted to:

     Job:   QTGTELNETS    User . . :   QTCP          Number . . . :   104878  
                                                                             
 Job 104878/QTCP/QTGTELNETS started on 06/18/98 at 09:33:32 in subsystem    
  QSYSWRK in QSYS. Job entered system on 06/18/98 at 09:33:32.            
*  Job 104878/QTCP/QTGTELNETS submitted. *                                
   Library QGPL added to library list.


Press F1 in the job log to the job submitted message which is a CPI1125.

 Message ID . . . . . . :   CPI1125       Severity . . . . . . . :   00        
Message type . . . . . :   Information                                        
Date sent  . . . . . . :   06/18/98      Time sent  . . . . . . :   09:33:32  
                                                                               
Message . . . . :   Job 104878/QTCP/QTGTELNETS submitted.                      
Cause . . . . . :   Job 104878/QTCP/QTGTELNETS submitted to job queue          
  QSYSNOMAX in QSYS from job 104697/QTCP/QTGTELNETS. Job                      
  104878/QTCP/QTGTELNETS was started using the Submit Job (SBMJOB) command    
  with the following job attributes: JOBPTY(5) OUTPTY(5) PRTTXT()              
  RTGDTA(TELNETS) SYSLIBL(SST        QTODSYS    QSYS       QHLPSYS    QUSRSYS  
    QSPTLIB    SECLIBV3R1 OSLSYS) CURLIB(QTCP) INLLIBL() LOG(4 00 *SECLVL)    
  LOGCLPGM(*NO) INQMSGRPY(*RQD) OUTQ(/*DEV) PRTDEV(PRT01) HOLD(*NO)            

   DATE(*SYSVAL) SWS(00000000) MSGQ(QUSRSYS/QTCP) CCSID(65535) SRTSEQ(*N/*HEX)  
  LANGID(ENU) CNTRYID(US).                                                    


The end of a job......

Message CPF1164 is the message issued after the job completes along with the ending code, indicating if the end was either normal or abnormal.

End 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).

If you are still unable to locate a job log, you can try locating the job information in the history log. To look at the history log, from an operating system command line, type the following:

DSPLOG LOG(QHST) MSGID(CPF1164)

Press the Enter key. You can search for a specific message ID in the history log by prompting (F4) on the DSPLOG QHST command, pressing F10 for additional information, pressing the page down, and typing in the message ID. You can also narrow down your search by specifying a date and time range.

[{"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

12621256

Document Information

Modified date:
05 October 2020

UID

nas8N1018310