PRTERRLOG (Print Error Log)

PRTERRLOG Command syntax diagram

 

Purpose

The Print Error Log (PRTERRLOG) command is used primarily for problem analysis. 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. The error log data can be used by the IBM service representatives.

Restriction: This command is shipped with public *EXCLUDE authority and the QPGMR, QSYSOPR, QSRV, and QSRVBAS user profiles have private authorities to use the command.

 

Optional Parameters

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, direct access storage devices or 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 on the DEV or RSRCNAME parameters are printed.

*ERRLOGID: Only the error data with the specified error log record is printed. If this value is specified, the ERRLOGID parameter must also be specified. It is ignored for other request types.

*VOLSTAT: If this value is specified and if OUTPUT(*PRINT) is specified, the tape or diskette volume 'lifetime' statistical data records are printed. If this value is specified and if OUTPUT(*OUTFILE) is specified, 'session' volume statistical data records are printed. If the name of the volume is reported as '******', it means that this volume is not displayable.

DEV
Specifies the device names for which the user wants the error log data printed.

Note: This parameter is valid only if TYPE(*DEV) is specified. This parameter cannot be specified if the RSRCNAME parameter is specified.

*ALL: The error log data is printed for all device names.

logical-device-name: Specify one or more device names for which error log data is to be printed. Up to ten device names can be specified.

RSRCNAME
Specifies the name of the resource for which error log entries are printed. This parameter cannot be specified if the DEV parameter is specified. This parameter is valid only if TYPE(*DEV) is specified. Up to ten resource names can be specified.

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

ERRLOGID
Specifies that error log entries with the specified error log identifier are printed. This parameter is valid only if TYPE(*ERRLOGID) is specified. It is ignored for other request types. Up to ten error log identifiers can be specified.

PRTFMT
Specifies that the indicated report prints any hexadecimal data in character format. This parameter cannot be specified if TYPE(*VOLSTAT) is specified or if the OUTFILE parameter is specified.

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

*HEX: The report is formatted so that hexadecimal data is printed in hexadecimal format.

Note: Specifying PRTFMT(*HEX) can cause spooling or printing of large amounts of data. This can impact overall system performance.

PERIOD
Specifies the period of time for which the error log data is printed. This parameter is specified as two sets of two values each.

Element 1: Start Time

*AVAIL: The error data that is available for the specified starting date is printed.

start-time: Specify the start time on 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: Start Date

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

start-date: Specify the starting date. The date must be specified in the job date format.

Element 3: End Time

*AVAIL: The error data that is available for the specified end date is printed.

end-time: Specify the ending time for the specified ending date that determines the error data that is printed.

Element 4: End Date

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

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

OUTPUT
Specifies whether the output from the command is printed with the job's spooled output or directed to a database file. More information on this parameter is in commonly used parameters.

*PRINT: The output is printed with the job's spooled output.

*OUTFILE: The output is directed to the database file specified on the OUTFILE parameter.

OUTFILE
Specifies the database file to which the report is directed. If the output file already exists, the system attempts to use it. Records replace or are added to existing data in the file member. If the output file does not exist, the system creates a database file in the specified library. A member is created for the file with the name specified in the OUTMBR parameter.

The name of the file can be qualified by one of the following library values:

*LIBL: All libraries in the job's library list are searched until the first match is found.

*CURLIB: The current library for the job is searched. If no library is specified as the current library for the job, the QGPL library is used.

library-name: Specify the name of the library to be searched.

file-name: Specify the name of the file that will receive the report.

OUTMBR
Specifies the name of the database file member to which the output is directed. If a member already exists, the system uses the second element of this parameter to determine whether the member is cleared before the new records are added. If the member does not exist and a member name is not specified, the system creates a member with the name of the output file specified on the OUTFILE parameter. If an output file member name is specified, but the member does not exist, the system creates it.

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 on the OUTFILE parameter.

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

Element 2: Operation to Perform on Member

*REPLACE: The system clears the existing member and adds the new records.

*ADD: The system adds the new records to the end of the existing records.

VOLTYPE
Specifies the volume type of the specified volume identifier. Valid values 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.

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.

VOL
Specifies one or more volume identifiers used by the file. More information on this parameter is in commonly used parameters.

*ALL: Volume statistics are processed for all volumes.

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

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 TYPE(*VOLSTAT) is specified.

Note: 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.

Note: If OUTPUT(*OUTFILE) is specified, *DLT cannot be specified.

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

*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 OUTFILE parameter. Session statistics cannot be printed.

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.

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 error types 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.

Examples for PRTERRLOG

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.

Error messages for PRTERRLOG

*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.