You are on page 1of 15

Understanding the Job Log

Part 21

Presentation Copyright 2008, Bryan Meyers, www.bmeyers.net


What Is a Job Log?

Job is identifiable unit of work


Interactive job started by sign on
Batch job submitted to batch environment
Job uses messages to communicate between
call stack entries
Job log is internal record of messages related
to a job
Sometimes called job message queue
Automatically created and maintained for every
job
What Is a Job Log?

Display Job Log (DSPJOBLOG) command


displays job log for active jobs
Display Job (DSPJOB) can also show job log
WDSc also includes iSeries Job Log tab
Job log can be spooled or removed at end of
job
File name QPJOBLOG
Usually in output queue QEZJOBLOGS
Displaying the Job Log

DSPJOBLOG (F10=Display detailed Messages)


Or DSPJOB OPTION(*JOBLOG)
Job LOG Attribute

LOG job attribute controls level of message


detail in job log
Also controls whether job log is spooled at job end
Job description controls LOG attribute
SBMJOB command can set LOG attribute for batch
job
CHGJOB command can set LOG attribute for active
job
CHGJOBD LOG(4 0 *SECLVL)
SBMJOB LOG(4 30 *SECLVL)
CHGJOB LOG(0 0 *NOLIST)
Job LOG Attribute

LOG parameter has three elements


Message logging level
Controls kind of message written to job log
Message severity level
Controls minimum message severity to log
O-99 (0=informational, 99=most severe)
Message text level
Specifies level of detail in job log
CHGJOBD LOG(4 0 *SECLVL)
SBMJOB LOG(4 30 *SECLVL)
CHGJOB LOG(0 0 *NOLIST)
Job LOG Attribute

Message logging level Messages kept in job log


0 None
1 Only messages sent to *EXT message queue
2 Messages sent to *EXT message queue,
Logged commands that issue messages,
Messages generated by logged commands
3 Messages sent to *EXT message queue,
All logged commands,
Messages generated by logged commands
4 All messages,
All logged commands

CHGJOBD LOG(4 0 *SECLVL)


SBMJOB LOG(4 30 *SECLVL)
CHGJOB LOG(0 0 *NOLIST)
Job LOG Attribute

Message text level Detail kept in job log


*NOLIST If job ends normally, job log is not spooled
*MSG Only first level message text is logged,
Job log is spooled whether job ends normally or abnormally
*SECLVL First and second level (detailed) message text is logged,
Job log is spooled whether job ends normally or abnormally

Most detail
CHGJOBD LOG(4 0 *SECLVL)
SBMJOB LOG(4 30 *SECLVL)
CHGJOB LOG(0 0 *NOLIST)
Logging CL Commands

LOGCLPGM job attribute controls logging of


most CL commands executed by job
Jobs logging level must be 3 or 4
CL commands appear on log as request
messages

CHGJOBD LOG(4 0 *SECLVL) LOGCLPGM(*YES)


SBMJOB LOG(4 30 *SECLVL) LOGCLPGM(*NO)
CHGJOB LOG(0 0 *NOLIST) LOGCLPGM(*SAME)
Displaying Logging Attributes

DSPJOB OPTION(*DFNA)
Logging CL Commands

CRTCLMOD can prevent command logging


when creating CL module
Even when job attribute is LOGCLPGM(*YES)
Not recommended
Or can force logging for module when job
attribute is LOGCLPGM(*NO)
CRTCLMOD LOG(*NO)
CRTCLMOD LOG(*JOB)
CRTCLMOD LOG(*YES)
Analyzing the Job Log

WRKSPLF
5761SS1 V6R1M0 080215 Job Log ISERIES1 xx/xx/xx 11:50:41 Page 1

Job name . . . . . . . . . . : QPADEV0006 User . . . . . . : MYUSER Number . . . . . . . . . . . : 617286


Job description . . . . . . : MYJOBD Library . . . . . : MYLIB

Job description,
MSGID TYPE library SEV DATE TIME FROM PGM LIBRARY INST
Job name,LIBRARY
TO PGM
user, number
INST

CPF1124 Information 00 xx/xx/xx 11:39:30.870509 QWTPIIPP QSYS 04C0 *EXT *N


Message . . . . : Job 617286/MYUSER/QPADEV0006 started on xx/xx/xx at
11:39:30 in subsystem QINTER in QSYS. Job entered system on xx/xx/xx at
11:39:30.
*NONE Request xx/xx/xx 11:40:10.421842 QUICMD QSYS 0542 QUICMD QSYS 0542
Message . . . . : -chgjob log(4 0 *seclvl) logclpgm(*yes)
*NONE Request xx/xx/xx 11:40:18.713278 QUICMD QSYS 0542 QUICMD QSYS 0542
Message . . . . : -dspcmd dspjob
*NONE Request xx/xx/xx 11:40:28.509061 QUICMD QSYS 0542 QUICMD QSYS 0542
Message . . . . : -dspactjob
CPD0030 Diagnostic 30 xx/xx/xx 11:40:28.509831 QCARULE QSYS 07E8 QUIMNDRV QSYS 060F
Message . . . . : Command DSPACTJOB in library *LIBL not found.
Cause . . . . . : If a library was not specified, the command was not found
in the libraries in the library list. If a library was specified, the
command was not found there. One of the following special values may have
been used to specify the library: *LIBL - The command was not found in the
libraries in the library list *NLVLIBL - The command was not found in the
national language version libraries in the system library list. *SYSTEM -
The command was not found in library QSYS. Recovery . . . : Change the
command name or correct the library name, and then try the command again.
CPF0001 Diagnostic 30 xx/xx/xx 11:40:28.509901 QCADRV2 QSYS 04D0 QUIMNDRV QSYS 060F
Message . . . . : Error found on DSPACTJOB command.
Cause . . . . . : The system detected errors in the command. Recovery . . .
: See the previously listed messages in the job log. Correct the errors
and then try the command again. *N instead of a command name means that the
name had not been determined before the error was found.
*NONE Request xx/xx/xx 11:40:34.216999 QUICMD QSYS 0542 QUICMD QSYS 0542
Message . . . . : -wrkactjob
*NONE Request xx/xx/xx 11:40:40.648586 QUICMD QSYS 0542 QUICMD QSYS 0542
Message . . . . : -wrkwtr
*NONE Request xx/xx/xx 11:40:51.513711 QUICMD QSYS 0542 QUICMD QSYS 0542
Analyzing the Job Log

WRKSPLF
5761SS1 V6R1M0 080215 Job Log ISERIES1 xx/xx/xx 11:50:41 Page 1
Message ID
Job name . . . . . . . . . . : QPADEV0006 User . . . . . . : MYUSER Number . . . . . . . . . . . : 617286
Job description . . . . . . : MYJOBD Library . . . . . : MYLIB
Message Type Message Severity
MSGID TYPE SEV DATE TIME FROM PGM LIBRARY INST TO PGM LIBRARY INST

CPF1124 Information 00 xx/xx/xx 11:39:30.870509 QWTPIIPP QSYS 04C0 *EXT *N


Message . . . . : Job 617286/MYUSER/QPADEV0006 started on xx/xx/xx at
11:39:30 in subsystem QINTER in QSYS. Job entered system on xx/xx/xx at
11:39:30.
*NONE Request Date, time
xx/xx/xx 11:40:10.421842 QUICMD QSYS 0542 QUICMD QSYS 0542
Message . . . . : -chgjob log(4 0 *seclvl) logclpgm(*yes)
*NONE Request xx/xx/xx 11:40:18.713278 QUICMD QSYS 0542 QUICMD QSYS 0542
Message . . . . : -dspcmd dspjob
*NONE Request xx/xx/xx 11:40:28.509061 QUICMD QSYS 0542 QUICMD QSYS 0542
Message . . . . : -dspactjob
CPD0030 Diagnostic 30 xx/xx/xx 11:40:28.509831 QCARULE QSYS 07E8 QUIMNDRV QSYS 060F
Message . . . . : Command DSPACTJOB in library *LIBL not found.
Cause . . . . . : If a library was not specified, the command was not found
in the libraries in the library list. If a library was specified, the
command was not found there. One of the following special values may have
been used to specify the library: *LIBL - The command was not found in the
libraries in the library list *NLVLIBL - The command was not found in the
national language version libraries in the system library list. *SYSTEM -
The command was not found in library QSYS. Recovery . . . : Change the
command name or correct the library name, and then try the command again.
CPF0001 Diagnostic 30 xx/xx/xx 11:40:28.509901 QCADRV2 QSYS 04D0 QUIMNDRV QSYS 060F
Message . . . . : Error found on DSPACTJOB command.
Cause . . . . . : The system detected errors in the command. Recovery . . .
: See the previously listed messages in the job log. Correct the errors
and then try the command again. *N instead of a command name means that the
name had not been determined before the error was found.
*NONE Request xx/xx/xx 11:40:34.216999 QUICMD QSYS 0542 QUICMD QSYS 0542
Message . . . . : -wrkactjob
*NONE Request xx/xx/xx 11:40:40.648586 QUICMD QSYS 0542 QUICMD QSYS 0542
Message . . . . : -wrkwtr
*NONE Request xx/xx/xx 11:40:51.513711 QUICMD QSYS 0542 QUICMD QSYS 0542
Analyzing the Job Log

WRKSPLF
5761SS1 V6R1M0 080215 Job Log ISERIES1 xx/xx/xx 11:50:41 Page 1

Job name . . . . . . . . . . : QPADEV0006 User . . . . . . : MYUSER Number . . . . . . . . . . . : 617286


Job description . . . . . . : MYJOBD Library . . . . . : MYLIB

MSGID TYPE SEV DATE TIME FROM PGM LIBRARY INST TO PGM LIBRARY INST

CPF1124 Information 00 xx/xx/xx 11:39:30.870509 QWTPIIPP QSYS 04C0 *EXT *N


Message . . . . : Job 617286/MYUSER/QPADEV0006 started on xx/xx/xx at
11:39:30 in subsystem QINTER in QSYS. Job entered system on xx/xx/xx at
11:39:30.
*NONE Request xx/xx/xx 11:40:10.421842 QUICMD QSYS 0542 QUICMD QSYS 0542
Message . . . . : -chgjob log(4 0 *seclvl) logclpgm(*yes)
*NONE Request xx/xx/xx 11:40:18.713278 QUICMD QSYS 0542 QUICMD QSYS 0542
Message . . . . : -dspcmd dspjob
*NONE Request xx/xx/xx 11:40:28.509061 QUICMD QSYS 0542 QUICMD QSYS 0542
Message . . . . : -dspactjob
CPD0030 Diagnostic 30 xx/xx/xx 11:40:28.509831 QCARULE QSYS 07E8 QUIMNDRV QSYS 060F
Message . . . . : Command DSPACTJOB in library *LIBL not found.
First level message text Cause . . . . . : If a library was not specified, the command was not found
in the libraries in the library list. If a library was specified, the
command was not found there. One of the following special values may have

Second level message text been used to specify the library: *LIBL - The command was not found in the
libraries in the library list *NLVLIBL - The command was not found in the
national language version libraries in the system library list. *SYSTEM -
The command was not found in library QSYS. Recovery . . . : Change the
command name or correct the library name, and then try the command again.
CPF0001 Diagnostic 30 xx/xx/xx 11:40:28.509901 QCADRV2 QSYS 04D0 QUIMNDRV QSYS 060F
Message . . . . : Error found on DSPACTJOB command.
Cause . . . . . : The system detected errors in the command. Recovery . . .
: See the previously listed messages in the job log. Correct the errors
and then try the command again. *N instead of a command name means that the
name had not been determined before the error was found.
*NONE Request xx/xx/xx 11:40:34.216999 QUICMD QSYS 0542 QUICMD QSYS 0542
Message . . . . : -wrkactjob
*NONE Request xx/xx/xx 11:40:40.648586 QUICMD QSYS 0542 QUICMD QSYS 0542
Message . . . . : -wrkwtr
*NONE Request xx/xx/xx 11:40:51.513711 QUICMD QSYS 0542 QUICMD QSYS 0542
Analyzing the Job Log

WRKSPLF
5761SS1 V6R1M0 080215 Job Log ISERIES1 xx/xx/xx 11:50:41 Page 1

Job name . . . . . . . . . . : QPADEV0006 User . . . . . . : MYUSER Number . . . . . . . . . . . : 617286


Job description . . . . . . : MYJOBD Library . . . . . : MYLIB

MSGID TYPE SEV DATE TIME FROM PGM LIBRARY INST TO PGM LIBRARY INST

CPF1124 Information 00 xx/xx/xx 11:39:30.870509 QWTPIIPP QSYS 04C0 *EXT *N


Message . . . . : Job 617286/MYUSER/QPADEV0006 started on xx/xx/xx at
11:39:30 in subsystem QINTER in QSYS. Job entered system on xx/xx/xx at
11:39:30.
*NONE Request xx/xx/xx 11:40:10.421842 QUICMD QSYS 0542 QUICMD QSYS 0542
Message . . . . : -chgjob log(4 0 *seclvl) logclpgm(*yes)
Logged CL command
*NONE Request xx/xx/xx 11:40:18.713278 QUICMD
Message . . . . : -dspcmd dspjob
QSYS 0542 QUICMD QSYS 0542

*NONE Request xx/xx/xx 11:40:28.509061 QUICMD QSYS 0542 QUICMD QSYS 0542
Message . . . . : -dspactjob
CPD0030 Diagnostic 30 xx/xx/xx 11:40:28.509831 QCARULE QSYS 07E8 QUIMNDRV QSYS 060F
Message . . . . : Command DSPACTJOB in library *LIBL not found.
Cause . . . . . : If a library was not specified, the command was not found
in the libraries in the library list. If a library was specified, the
command was not found there. One of the following special values may have
been used to specify the library: *LIBL - The command was not found in the
libraries in the library list *NLVLIBL - The command was not found in the
national language version libraries in the system library list. *SYSTEM -
The command was not found in library QSYS. Recovery . . . : Change the
command name or correct the library name, and then try the command again.
CPF0001 Diagnostic 30 xx/xx/xx 11:40:28.509901 QCADRV2 QSYS 04D0 QUIMNDRV QSYS 060F
Message . . . . : Error found on DSPACTJOB command.
Cause . . . . . : The system detected errors in the command. Recovery . . .
: See the previously listed messages in the job log. Correct the errors
and then try the command again. *N instead of a command name means that the
name had not been determined before the error was found.
*NONE Request xx/xx/xx 11:40:34.216999 QUICMD QSYS 0542 QUICMD QSYS 0542
Message . . . . : -wrkactjob
*NONE Request xx/xx/xx 11:40:40.648586 QUICMD QSYS 0542 QUICMD QSYS 0542
Message . . . . : -wrkwtr
*NONE Request xx/xx/xx 11:40:51.513711 QUICMD QSYS 0542 QUICMD QSYS 0542

You might also like