Print Error Log (PRTERRLOG)

Where allowed to run: All environments (*ALL)
Threadsafe: No
Parameters
Examples
Error messages

The Print Error Log (PRTERRLOG) command is used primarily for problem analysis tasks. It places a formatted printer file of the data in the machine error log in a spooled printer device file named QPCSMPRT or in a specified output file.

Restrictions:

Top


 

Parameters

Keyword Description Choices Notes
TYPE Type of log data to list *ALL, *ALLSUM, *ANZLOG, *MCH, *DEV, *ERRLOGID, *VOLSTAT Optional, Positional 1
DEV Logical device Single values: *ALL
Other values (up to 10 repetitions): Name
Optional
RSRCNAME Resource name Values (up to 10 repetitions): Name Optional
ERRLOGID Error log identifier Values (up to 10 repetitions): Hexadecimal value Optional
OUTPUT Output *PRINT, *OUTFILE Optional
PERIOD Time period for log output Element list Optional
Element 1: Element list
Element 1: Beginning time Time, *AVAIL
Element 2: Beginning date Date, *CURRENT
Element 2: Element list
Element 1: Ending time Time, *AVAIL
Element 2: Ending date Date, *CURRENT
PRTFMT Print format *CHAR, *HEX Optional
OUTFILE File to receive output Qualified object name Optional
Qualifier 1: File to receive output Name
Qualifier 2: Library Name, *LIBL, *CURLIB
OUTMBR Output member options Element list Optional
Element 1: Member to receive output Name, *FIRST
Element 2: Replace or add records *REPLACE, *ADD
VOLTYPE Volume type Character value Optional
MODEL Model number Character value Optional
VOL Volume Single values: *ALL
Other values (up to 10 repetitions): Character value
Optional
VOLSTAT Volume statistical data *KEEP, *DLT Optional
VOLSTATTYP Volume statistics type *LIFETIME, *SESSION Optional
SELECT Error log entries to select *ALL, *PRC, *MEDIA, *LWS, *CMN, *PWR, *LPP, *LIC Optional
SORT Sort by *DATETIME, *TIME, *DEVADR, *ERRTYPE, *RSRCNAME Optional

Top

 

Type of log data to list (TYPE)

Specifies the type of error log data from the machine error log to print in the spooled printer file.

*ALL

All the error codes in the machine's error log are printed. In addition, the error codes for each subsystem (for example, diskette units, printers) are printed in summary form.

*ALLSUM

All the data in the error log is printed in summary form.

*ANZLOG

A one-line summary is created for each entry in the error log.

*MCH

Only the error data produced by machine checks is printed.

*DEV

Only the error data produced by the devices specified in the following parameters is printed:

  • Logical device (DEV) parameter

  • Resource name (RSRCNAME) parameter

*ERRLOGID

Only the error data with the specified error log record is printed. *ERRLOGID can only be specified if the Error log identifier (ERRLOGID) parameter is also specified. It is ignored for other request types.

*VOLSTAT

Only the tape or diskette volume statistical data records are printed.

If you specify *PRINT on the Output (OUTPUT) parameter and *VOLSTAT on this parameter, lifetime statistics are printed. If you specify *OUTFILE on the OUTPUT parameter and *VOLSTAT on this parameter, session statistics are directed to the output file. If the name of the volume is reported as '******', it means that this volume is not displayable.

Top

 

Logical device (DEV)

Specifies the device names for which you want the error log data to be printed. This parameter is valid only if *DEV is specified for the Type of log data to list (TYPE) parameter. This parameter cannot be specified if a value is specified for the Resource name (RSRCNAME) parameter.

Single values

*ALL

The error log data for all device names is printed.

Other values

name

Specify one or more device names whose error log data you want to print. A maximum of ten device names can be specified.

Top

 

Resource name (RSRCNAME)

Specifies the resource names for which error log entries are to be printed. This parameter is valid only if *DEV is specified for the Type of log data to list (TYPE) parameter. This parameter cannot be specified if a value is specified for the Logical device (DEV) parameter.

name

Specify one or more resource names whose error log data you want to print. A maximum of ten resource names can be specified.

If you specify a storage controller input/output processor (IOP) as the resource name, no error log entries are printed for the resource.

Top

 

Error log identifier (ERRLOGID)

Specifies that error log entries with the specified error log identifier are printed. This parameter is valid only if *ERRLOGID is specified for the Type of log data to list (TYPE) parameter. A maximum of ten error log identifiers can be specified.

hexadecimal-value

Specify the error log identifier of an error log entry to be printed.

Top

 

Output (OUTPUT)

Specifies whether the output from the command is printed with the job's spooled output or sent to a database file.

*PRINT

The output is printed with the job's spooled output.

*OUTFILE

The output is directed to the database file specified for the File to receive output (OUTFILE) parameter.

Top

 

Time period for log output (PERIOD)

Specifies the period of time for which the error log data is printed. The following values can be coded in this parameter, which contains two sets of two values each.

This parameter is not valid when TYPE(*VOLSTAT) and VOLSTATTYP(*LIFETIME) are specified.

Element 1:

Element 1: Beginning time

*AVAIL

The error data that is available for the specified start or end date is printed.

time

Specify the start time of the specified start date for which the error data is printed. The time is specified in 24-hour format with or without a time separator as follows:

  • With a time separator, specify a string of 5 or 8 digits, where the time separator for the job separates the hours, minutes, and seconds. If you issue this command from the command line, the string must be enclosed in apostrophes. If a time separator other than the separator specified for your job is used, this command fails.

  • Without a time separator, specify a string of 4 or 6 digits (hhmm or hhmmss) where hh = hours, mm = minutes, and ss = seconds. Valid values for hh range from 00 through 23. Valid values for mm and ss range from 00 through 59.

Element 2: Beginning date

*CURRENT

The error data that is available for the current day and between the specified start and end times (if specified) is printed.

date

Specify the start date for which error data is printed. The date must be specified in the job date format.

Element 2:

Element 1: Ending time

*AVAIL

The error data that is available for the specified start or end date is printed.

time

Specify the end time for the specified end date that specifies the error data to be printed. See the Beginning time description on this parameter for details about how time must be specified.

Element 2: Ending date

*CURRENT

The error data that is available for the current day and between the specified start and end times (if specified) is printed.

date

Specify the end date for which error data is printed. The date must be specified in the job date format.

Top

 

Print format (PRTFMT parameter)

Specifies whether the indicated report prints any hexadecimal data in character format. This parameter cannot be specified if *VOLSTAT is specified for the Type of log data to list (TYPE) parameter, or if a value is specified for the File to receive output (OUTFILE) parameter.

*CHAR

The report is formatted so that hexadecimal data prints as character data.

*HEX

No formatting is done for the report. Hexadecimal data prints as hexadecimal.

Top

 

File to receive output (OUTFILE)

Specifies the database file to which the output of the command is directed. If the file does not exist, this command creates a database file in the specified library. If the file is created, the public authority for the file is the same as the create authority specified for the library in which the file is created. Use the Display Library Description (DSPLIBD) command to show the library's create authority.

Qualifier 1: File to receive output

name

Specify the name of the database file to which the command output is directed.

Qualifier 2: Library

*LIBL

The library list is used to locate the file. If the file is not found, one is created in the current library. If no current library exists, the file will be created in the QGPL library.

*CURLIB

The current library for the thread is used to locate the file. If no library is specified as the current library for the thread, the QGPL library is used.

name

Specify the name of the library to be searched.

Top

 

Output member options (OUTMBR)

Specifies the name of the database file member to which the output is directed when *OUTFILE is specified for the Output (OUTPUT) parameter.

Element 1: Member to receive output

*FIRST

The first member in the file receives the output. If OUTMBR(*FIRST) is specified and the member does not exist, the system creates a member with the name of the file specified for the File to receive output (OUTFILE) parameter.

name

Specify the name of the file member that receives the output. If OUTMBR(member-name) is specified and the member does not exist, the system creates it.

If the member exists, you can add records to the end of the existing member or clear the existing member and add the records.

Element 2: Replace or add records

*REPLACE

The existing records in the specified database file member are replaced by the new records.

*ADD

The new records are added to the existing information in the specified database file member.

Top

 

Volume type (VOLTYPE)

Specifies the volume type of the specified volume identifier. Valid entries are 4-digit device type numbers for cartridge tape, reel tape, or diskette. This parameter returns information about all the volumes that use the same technology as the tape device type that was specified. For example, if 6380 is the specified value for this parameter, information about all 1/4 inch tape cartridges on the system is returned.

character-value

Specify the volume type.

Top

 

Model number (MODEL)

Specifies the model number of the specified model type. This parameter is required if the device type is 9331 and TYPE(*VOLSTAT) is specified.

character-value

Specify the model number.

Top

 

Volume (VOL)

Specifies the name of the volume for which you want statistics processed.

Single values

*ALL

Volume statistics are processed for all volumes.

Other values

character-value

Specify the name of the volume for which statistics are processed. A maximum of ten volume names can be specified.

Top

 

Volume statistical data (VOLSTAT)

Specifies whether the volume statistical data records are kept or deleted from the machine error log after they are printed. This parameter is valid only if *VOLSTAT is specified on the Type of data (TYPE) parameter.

ENDOPT(*UNLOAD) must be specified during the SAVE operation to generate volume statistics at the completion of the tape operation.

*KEEP

The volume statistical data records are kept in the error log after they are printed.

*DLT

The volume statistical data records are deleted from the error log for volumes that are not active after they are printed.

Notes:

  1. You cannot specify *DLT on this parameter if *OUTFILE is specified on the Output (OUTPUT) parameter.

  2. The length of time it takes to run this command when VOLSTAT(*DLT) is specified is dependent on the number of volume IDs being deleted.

Top

 

Volume statistics type (VOLSTATTYP)

Specifies the type of volume statistics printed or directed to an output file. This parameter is valid only if *VOLSTAT is specified on the Type of log data to list (TYPE) parameter.

*LIFETIME

Lifetime statistics are printed. Lifetime statistics cannot be placed in an output file.

*SESSION

Session statistics are directed to the output file specified on the File to receive output (OUTFILE) parameter. Session statistics cannot be printed.

Top

 

Error log entries to select (SELECT)

Specifies which type of error log entries are included on the report.

*ALL

All error log entries are included on the report.

*PRC

The processor error log entries are included on the report.

*MEDIA

The error log entries for disk, tape, and diskette devices are included on the report.

*LWS

The error log entries for local workstations are included on the report.

*CMN

The error log entries for communications are included on the report. These include entries for communications I/O processors, I/O adapters, ports, lines, controllers, and devices connected with SDLC, ASYNC, BSC, X.25, IDLC, ISDN, and local area network line protocols.

*PWR

The error log entries for system power control network (SPCN) are included on the report.

*LPP

The error log entries for licensed programs are included on the report.

*LIC

The error log entries for Licensed Internal Code are included on the report.

Top

 

Sort by (SORT)

Specifies the order in which the entries appear on the report.

*DATETIME

The entries are sorted by date and time. The summary entries are for each day.

*TIME

The entries are sorted by the time of day only. The summary entries are for each hour.

*DEVADR

The entries are sorted by the address of the device. The summary entries are divided into three levels: those for which the first two digits of the address are the same, those for which the first four digits of the address are the same, and those for which the first eight digits of the address are the same.

*ERRTYPE

The entries are sorted by the severity of the type of error. The more severe types of errors report at the top of the list. The summary entries are divided into two levels: those that have a common error type, and those that have a common error type and system reference code.

*RSRCNAME

The entries are sorted by the resource name of the device.

Top


 

Examples

Example 1: Printing Error Log Data

 PRTERRLOG 

This command gets the error data in the machine error log that occurred for all device types and puts it in a spooled file. The entire error log is printed and any hexadecimal data is in character format.

Example 2: Using the System Resource Manager Database

 PRTERRLOG   TYPE(*DEV)  RSRCNAME(TAPE000001)  PRTFMT(*HEX)

This command uses the system resource manager database to determine the device type, model, and serial number for the resource TAPE000001. The print request is based on that information. The report is put in the spooled file and contains all records that pertain to that device type, model, and serial number. Any hexadecimal data in the file is converted to hexadecimal format.

Example 3: Processing Error Log Entries

 PRTERRLOG   TYPE(*DEV)  DEV(DISKLUD1)  OUTPUT(*OUTFILE)
            OUTFILE(MYLIB/MYDBD)  OUTMBR(ELOG)

This command processes all the error log entries for the logical device named DISKLUD1. They are put in the file MYDBD, in the library MYLIB, and in the member ELOG. No spooled files are created.

Top


 

Error messages

*ESCAPE Messages

CPD36CA

OUTPUT(*OUTFILE) cannot be specified with DEV(*ALL).

CPD36C2

DEV and RSRCNAME cannot be used together.

CPD36C3

PRTFMT parameter not valid with TYPE(*VOLSTAT).

CPD36C4

OUTFILE not valid with PRTFMT parameter.

CPD36C5

RSRCNAME parameter can only be used with TYPE(*DEV) parameter.

CPD36C7

ERRLOGID valid only with TYPE(*ERRLOGID).

CPD36C9

PERIOD not valid for specified TYPE and VOLSTATTYP.

CPF3535

Error log not available for printing.

CPF3541

No error log entries were found.

CPF3593

PERIOD parameter start time exceeds end time.

CPF3693

Service function ended because error occurred.

CPI36CA

Resource name &1 not found.

CPI36CC

No error log entries were found for &1 &2.

Top