Command reference / sys

DSPLOG

Display Log

Shows the system history log (QHST), which records information about how the system operates and its status. The display lists each logged message with the date and time it was sent and the name of the job and program that sent it. The QSYS2.HISTORY_LOG_INFO table function returns similar information.

Allowed environments: *ALL. Positional parameters: 3.

Parameters

LOG Log

Specifies which log on the system is shown. Only QHST, the system history log, is offered.

Type
*CHAR
Required
No
Default
QHST
Length
4
Case
Uppercase

Allowed values: QHST

PERIOD Time period for log output

Specifies the period of time for which logged message data is shown. It takes a start element list (time, date) and an end element list (time, date). If PERIOD is not specified, the default is ((*AVAIL *CURRENT) (*AVAIL *CURRENT)).

Type
*ELEM
Required
No
Case
Uppercase
*AVAIL
For a time, includes all logged data available for the given date.
*CURRENT
For a date, means the current day (as a start date, data from the current day is shown; as an end date, today is the last day shown).
*BEGIN
As a start date, shows logged data from the beginning of the log.
*END
As an end date, the last day on which data was logged.
Elements in order

Start time and date Start time and date

Type
*ELEM
Required
No
Case
Uppercase
Elements in order

Beginning time Beginning time

Type
*TIME
Required
No
Default
*AVAIL
Case
Uppercase

Suggested / special values: *AVAIL

Beginning date Beginning date

Type
*DATE
Required
No
Default
*CURRENT
Case
Uppercase

Suggested / special values: *CURRENT, *BEGIN

End time and date End time and date

Type
*ELEM
Required
No
Case
Uppercase
Elements in order

Ending time Ending time

Type
*TIME
Required
No
Default
*AVAIL
Case
Uppercase

Suggested / special values: *AVAIL

Ending date Ending date

Type
*DATE
Required
No
Default
*CURRENT
Case
Uppercase

Suggested / special values: *CURRENT, *END

JOB Jobs to display

Specifies the jobs, if any, whose logged messages are shown, limited to the time period specified. Up to five jobs can be named, each as a job name, user name and job number with generic names allowed.

Type
*QUAL
Required
No
Default
*NONE
List limit
5
Case
Uppercase

Suggested / special values: *NONE

*NONE
No job name is used to filter; messages from all jobs are included.
*ALL
As a job name, user name or job number qualifier, matches all values of that element.
Qualified parts (object, then library; write LIBRARY/OBJECT)

Jobs to display Jobs to display

Type
*GENERIC
Required
No
Length
10
Case
Uppercase

Suggested / special values: *ALL

User User

Type
*GENERIC
Required
No
Length
10
Case
Uppercase

Suggested / special values: *ALL

Number Number

Type
*CHAR
Required
No
Length
6
Case
Uppercase

Suggested / special values: *ALL

OUTPUT Output

Specifies whether the output is shown at the requesting display station or printed with the job's spooled output.

Type
*CHAR
Required
No
Default
*
Length
10
Case
Uppercase

Allowed values: *, *PRINT, *PRTWRAP, *PRTSECLVL

*
Shown on the display if requested by an interactive job; printed with spooled output if requested by a batch job.
*PRINT
Printed with the job's spooled output, one line per message, showing the first 105 characters of first-level text.
*PRTWRAP
Printed with spooled output; long messages wrap onto extra lines, up to 2000 characters of first-level text.
*PRTSECLVL
Printed with spooled output including first- and second-level text, up to 2000 and 6000 characters respectively.

MSGID Message identifier

Specifies up to 200 message identifiers to include in or omit from the output, depending on MSGIDSLT. Generic forms such as CPF0000 select all messages with that prefix.

Type
*NAME
Required
No
Default
*ALL
Length
10
List limit
200
Case
Uppercase

Suggested / special values: *ALL

*ALL
All logged messages are included regardless of identifier, if they meet the job and time specifications.

MSGIDSLT Message identifier selection

Specifies whether the message identifiers listed in MSGID are included in or omitted from the output.

Type
*CHAR
Required
No
Default
*INCLUDE
Length
8
Case
Uppercase

Allowed values: *INCLUDE, *OMIT

*INCLUDE
Messages whose IDs match the MSGID list are included in the output.
*OMIT
Messages whose IDs match the MSGID list are left out of the output.

Examples

DSPLOG LOG(QHST)

Shows all logged messages and their associated data available in the history log for the current date.

DSPLOG MSGID(CPF1124 CPF1164) MSGIDSLT(*OMIT)

Omits CPF1124 (job started) and CPF1164 (job ended) when showing messages from the current date.

IBM command documentation

Generated from os/cl/catalog/DSPLOG.json and os/cl/help/DSPLOG.json.