DSPJOBLOG (Display Job Log) Command Description

DSPJOBLOG Command syntax diagram

Purpose

The Display Job Log (DSPJOBLOG) command shows commands and related messages for a job whose job log is not written. You can also show commands for a job on a job queue that has not started processing.

This command is used to monitor the progress of a job.

Note: This function can also be accessed through the Display Job (DSPJOB) and Work with a Job (WRKJOB) commands.

Restrictions:

  1. To display a job log, the user must have special job control authority (*JOBCTL), or the job must have the same user name as the person running this command.
  2. To display a job that is running for the security officer or a member of the security officer group, the user also must have *ALLOBJ special authority.

Optional Parameters

JOB
Specifies the name of the job whose job log is shown. If no job qualifier is given, all jobs currently in the system are searched for the simple job name. If duplicates of the specified name are found, a list of messages containing the qualified job names of all duplicate names is shown.

A job identifier is a special value or a qualified name with up to three elements. For example:

*
job-name
user-name/job-name
job-number/user-name/job-name

*: The job in which this command is issued is the job whose job log is shown.

job-name: Specify the name of the job whose job log is shown.

user-name: Specify the name of the user of the job whose job log is shown.

job-number: Specify the number of the job whose job log is shown.

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

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

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

*OUTFILE: The output is directed to the database file specified in the OUTFILE parameter. This option can only be used if the JOB parameter specifies the special value asterisk (*). Using this option only allows a primary output file to be produced.

*APIDFN: The output is directed to the database files which were previously prepared by running the QMHCTLJL API. This option can only be used if the JOB parameter specified the special value asterisk (*). The OUTFILE and OUTMBR parameters are not used.

When this option is used both a primary and secondary output file can be produced. Any message filtering specified onthe API is applied to the messages before they are written to the data base. THe database format (QMHPFT) of the outpt file is the same as that used in hte IBM-supplied database file QAMHJLPR.

OUTFILE
Specifies the name of the database file to which the output of the display is directed. If this file does not exist, this command creates a database file in the specified library. The public authority is the same as the create authority specified for the library in which the file is created.

The file specified here cannot be a DDM file.

The possible library values are:

*LIBL: The library list is used to locate the outfile. If the outfile is not found, one is created in the current library. If no current library exists, the outfile is created in the QGPL library.

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

library-name: Specify the name of the library where the outfile is located.

Database-file-name: Specify the name of the outfile that receives the output of the display.

OUTMBR
Specifies the name of the database file member to which the output is directed.

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. If the member already exists, the user has the option to add new records to the end of the existing member or clear the member and then add the new records.

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. If the member already exists, you have the option to add new records to the end of the existing member or clear the member and then add the new records.

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.

Example for DSPJOBLOG

DSPJOBLOG   JOB(ANDERSON/PAYROLL)  OUTPUT(*PRINT)

This command produces a job log for job PAYROLL for user ANDERSON.

Error messages for DSPJOBLOG

*ESCAPE Messages

CPF0941
Job &3/&2/&1 no longer in system.
CPF1069
End of duplicate names.
CPF1070
Job &3/&2/&1 not found.
CPF24DB
The *APIDFN option requires that the QMHCTLJL API be run first.
CPF24D7
File &1 in library &2 cannot be used for job log production.
CPF24D8
DDM file &1 in library &2 cannot be used for job log production.
CPF24E0
Failure occurred while writing job log to file &1 in library &2.
CPF2441
Not authorized to display job log.
CPF2443
Job log not displayed or listed because job has ended.
CPF2523
No job log information.
CPF2532
Job message queue is damaged. Job log ended.
CPF9822
Not authorized to file &1 in library &2.
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.