DSPJOB (Display Job)
Purpose
The Display Job (DSPJOB) command displays, for the specified user job, any of the following information:
- Job status attributes
- Job definition attributes
- Job run attributes
- Spooled file information
- Job log information
- Call stack information
- Job lock information
- Library list information
- Open file information
- File override information
- Commitment control status
- Communications status
- Activation group information
- Mutex information
- Thread information
- Media library attribute information
The information for the following options can be shown only when the job is active: job run attributes, call stack information, job lock information, library list information, job log information, open file information, file override information, commitment control status, communication status, activation group information, mutex information, thread information, and media library attribute information. The following options can be found whether the user's job is on the job queue, on an output queue, or active in the system: job status attributes, job definition attributes, and spooled file information. However, the job is not considered to be in the system until all of its input has been completely read in; only then is an entry placed on the job queue.
Restrictions:
- The command must be issued from within the job being displayed, or the issuer of the command must be running under a user profile which is the same as the job user identity of the job being displayed, or the issuer of the command must be running under a user profile which has job control (*JOBCTL) special authority.
The job user identity is the name of the user profile by which a job is known to other jobs. It is described in more detail in the Work Management book.
- Activation group information for a job cannot be shown if the job is being held when this command is run.
- This command fails in a job that allows multiple threads if OPTION(*FILOVR) or OPTION(*ALL) is specified.
Optional Parameters
- JOB
- Specifies the name of the user job whose information is to be displayed. If no job qualifier is given, a search for the simple job name is made of all of the jobs currently in the system. If duplicates of the specified name are found, a list of messages that contains the qualified job names of all duplicates is displayed.
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-nameMore information on this parameter is in commonly used parameters.
*: The job whose information is displayed is the job from which this display command is entered.
job-name: Specify the name of the job whose information is to be displayed.
user-name: Specify the name of the user of the job whose information is to be displayed.
job-number: Specify the number of the job whose information is to be displayed.
- OUTPUT
- Specifies whether the output from the command is displayed at the requesting work station or printed with the job's spooled output. If the output is to go to a printer, the job log information is not included. To print the job log information, use the Display Job Log (DSPJOBLOG) command. 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.
- OPTION
- Specifies the information to be shown on the display station (or printed as specified on the OUTPUT parameter). Only one value may be selected.
*SELECT: Shows a list of options that allows the user to select the displayed job information.
*STSA: The status attributes associated with the job are displayed.
*DFNA: The definition attributes associated with the job are displayed.
*RUNA: The run attributes associated with the job are displayed.
*SPLF: The spooled files associated with the job are displayed.
*JOBLOG: The job log associated with the job is displayed. The job log is printed or displayed depending on what is specified for the OUTPUT parameter. This value is not shown when either OPTION(*SELECT) or OPTION(*ALL) is specified.
*PGMSTK: The call stack associated with the initial thread of the job is displayed.
*JOBLCK: The job locks associated with the job are displayed.
*LIBL: The library list associated with the job is displayed.
*OPNF: The open files associated with the job are displayed.
*FILOVR: The file overrides associated with the job are displayed.
*CMTCTL: The commit control status of the job is displayed.
*CMNSTS: The communications status of the job is displayed.
*ACTGRP: The activation groups associated with the job are displayed.
*MUTEX: The mutex information associated with the initial thread of the job is shown.
*THREAD: Information about the job's threads is displayed.
*MLBA: Information about the job's media library attributes is displayed.
*ALL: All information associated with the job is displayed.
- DUPJOBOPT
- Specifies the action taken when duplicate jobs are found by this command.
*SELECT: The selection display is shown when duplicate jobs are found during an interactive session. Otherwise, a message is issued.
*MSG: A message is issued when duplicate jobs are found.
Examples for DSPJOB
Example 1: Printing the Spooled Output
DSPJOB JOB(SMITH/PAYROLL) OUTPUT(*PRINT)This command directs the information for the job named PAYROLL submitted by the user named SMITH to the job's output spooling queue for printing.
Example 2: Displaying the Job's Spooled Output
DSPJOB OPTION(*SPLF)This command displays the spooled output for the current job.
Example 3: Displaying All of the Job's Information
DSPJOB OPTION(*ALL)This command displays all of the information for the current job.
Error messages for DSPJOB
*ESCAPE Messages
- CPF0941
- Job &3/&2/&1 no longer in system.
- CPF1069
- End of duplicate names.
- CPF1070
- Job &3/&2/&1 not found.
- CPF1071
- No authority to job &3/&2/&1.
- CPF2443
- Job log not displayed or listed because job has ended.
- CPF3330
- Necessary resource not available.
- CPF3336
- Job &5/&4/&3 no longer in the system.
- 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.
- CPF9850
- Override of printer file &1 not allowed.
- CPF9851
- Overflow value for file &1 in &2 too small.
- CPF9871
- Error occurred while processing.