Display Log (DSPLOG)
Where allowed to run: All environments (*ALL)
Threadsafe: NoParameters
Examples
Error messagesThe Display Log (DSPLOG) command shows the system history log (QHST). The history log contains information about the operation of the system and system status.
The display contains the messages sent to the log, the date and time the message was sent, and the name of the job that sent it.
Top
Parameters
Keyword Description Choices Notes LOG Log QHST Optional, Positional 1 PERIOD Time period for log output Element list Optional, Positional 2 Element 1: Start time and date Element list Element 1: Beginning time Time, *AVAIL Element 2: Beginning date Date, *CURRENT, *BEGIN Element 2: End time and date Element list Element 1: Ending time Time, *AVAIL Element 2: Ending date Date, *CURRENT, *END OUTPUT Output *, *PRINT, *PRTWRAP, *PRTSECLVL Optional JOB Jobs to display Single values: *NONE
Other values (up to 5 repetitions): Qualified job nameOptional, Positional 3 Qualifier 1: Jobs to display Name Qualifier 2: User Name Qualifier 3: Number 000000-999999 MSGID Message identifier Single values: *ALL
Other values (up to 100 repetitions): NameOptional
Top
Log (LOG)
Specifies the log on the system that is shown.
- QHST
- The system history log QHST is shown.
Top
Time period for log output (PERIOD)
Specifies the period of time for which the logged message data is shown. This parameter contains two element lists of two elements each. A value or *N must be specified for an element if a subsequent element value will be specified in order to maintain its position in the parameter value sequence. If PERIOD is not specified, the following values are assumed:
PERIOD((*AVAIL *CURRENT) (*AVAIL *CURRENT))Element 1: Start time and date
Element 1: Starting time
One of the following is used to specify the starting time at which or after which the data must have been logged. Any entries logged before the specified time and date are not shown.
- *AVAIL
- Any logged data that is available for the specified starting date is shown.
- start-time
- Specify the starting time for the specified starting date that indicates the logged data to be shown. The time is specified in 24-hour format and can be specified with or without a time separator:
- Without a time separator, specify a string of 4 or 6 digits (hhmm or hhmmss) where hh = hours, mm = minutes, and ss = seconds. Hours, minutes, and seconds must each be exactly 2 digits. Use leading zeros if necessary. Valid values for hh range from 00 through 23. Valid values for mm and ss range from 00 through 59.
- With a time separator, specify a string of 5 or 8 digits where the time separator specified for your job is used to separate the hours, minutes, and seconds. If you enter 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 will fail.
Element 2: Starting date
One of the following is used to specify the starting date on which or after which the data must have been logged. Any entries logged before the specified date are not shown.
- *CURRENT
- The logged data for the current day and between the specified starting and ending times (if specified) is shown.
- *BEGIN
- The logged data from the beginning of the log is shown.
- start-date
- Specify the starting date with or without date separators. The date must be entered in the date format that this job uses, as specified in the date format job attribute. If date separators are used then they need to be the same as the date separator that this job uses, as specified in the date separator job attribute.
Element 2: End time and date
The values specified for the ending date and time are ignored if the output is shown on the display. That is, all data in the log that was logged on or after the specified starting date and time can be shown, regardless of the ending date and time specified.
Element 1: Ending time
One of the following is used to specify the ending time before which the data must have been logged.
- *AVAIL
- Any logged data that is available for the specified ending date is shown.
- end-time
- Specify the ending time for the specified ending date that determines the logged data to be printed. See start-time for the formats in which time can be entered.
Element 2: Ending date
One of the following is used to specify the ending date before which or on which the data must have been logged.
- *CURRENT
- The current day is the last day for which logged data is shown.
- *END
- The last day on which data was logged is the last day for which the logged data is shown. If *END is specified, an ending time value other than *AVAIL is ignored.
- end-date
- Specify the ending date with or without date separators. The date must be entered in the date format that this job uses, as specified in the date format job attribute. If date separators are used then they need to be the same as the date separator that this job uses, as specified in the date separator job attribute.
If no output is received after you run the DSPLOG command with *PRINT specified, the dates of some message data may be out of sequence. To print the data in this case, specify:
PERIOD((*AVAIL *BEGIN)(*AVAIL *END)).
Top
Output (OUTPUT)
Specifies whether the output from the command is shown at the requesting display station or printed with the job's spooled output.
- *
- Output requested by an interactive job is shown on the display. Output requested by a batch job is printed with the job's spooled output.
- The output is printed with the job's spooled output. Only one line of message text will be printed for each message. This will be the first 105 characters of the first level message text.
- *PRTWRAP
- The output is printed with the job's spooled output. If the message does not fit on one line, additional lines are printed to accommodate up to 2000 characters of the first level message text.
- *PRTSECLVL
- The output is printed with the job's spooled output. Both the first and second level text of the message are printed. Up to 2000 characters of first level text and 6000 characters of second level text will be printed.
When the output is printed, two or more lines are printed for each message. The last line contains the following information:
- Qualified job name of the job that sent the message. This consists of the following three fields:
- Job name
- User name
- Job number
- The date and time the message was sent.
- The name of the user profile that the thread was running under when the message was sent.
Top
Jobs to display (JOB)
Specifies the jobs (if any) for which messages in the log are shown. The messages for the specified jobs are shown only if they were logged in the period of time specified in this command.
Single values
- *NONE
- No job name is used to indicate which messages are shown.
Other values
- qualified-job-name
- Specify the names of up to five jobs that are to have their logged messages shown. A job name can be qualified with up to three elements. For example:
- job-name
- user-name/job-name
- job-number/user-name/job-name
If a job name is not qualified, all jobs by that name in the log will have their messages shown.
Top
Message identifier (MSGID)
Specifies up to 100 message identifiers (if any) of the logged messages that are shown. These messages are shown only if they were logged in the period of time specified for the Time period for log output (PERIOD) parameter and in the jobs specified for the Jobs to display (JOB) parameter.
Single values
- *ALL
- All logged messages, regardless of their identifiers, are shown if they meet the previous job and time specifications.
Other values
- message-identifier
- Specify the identifiers of messages that are shown.
To display specific generic types of messages, specify the 3-character code that identifies the message file followed by all zeros. For example, CPF0000 specifies that all CPF messages that meet the specifications of the previous parameters are shown. If an identifier is specified as pppnn00, any message beginning with the specified five characters (pppnn) can be shown. Refer to the description of the MSGID parameter in the Add Message Description (ADDMSGD) command for more information on message identifiers.
Top
Examples
Example 1: Displaying Logged Messages for Current Date
DSPLOG LOG(QHST)This command shows all the logged messages (and their associated data) that are available in the history log for the current date.
Example 2: Displaying Logged Messages for September 1988
DSPLOG JOB(MYJOB) PERIOD((*AVAIL 090199) (*AVAIL 093099)) MSGID(CPF0000)This command displays all CPF messages, in the history log for MYJOB, that were logged during September 1999.
Top
Error messages
*ESCAPE Messages
- CPF2403
- Message queue &1 in &2 not found.
- CPF2447
- No entries exist in current version of log.
- CPF2478
- Not authorized to requested version of log.
- CPF2480
- Requested version of log damaged.
- CPF2519
- Error occurred while processing message ID list.
- CPF2537
- Too many records written to file &2 in &3.
- CPF9845
- Error occurred while opening file &1.
- CPF9846
- Error while processing file &1 in library &2.
- CPF9847
- Error occurred while closing file &1 in library &2.
Top