Display Job (DSPJOB)

Where allowed to run: All environments (*ALL)
Threadsafe: No
Parameters
Examples
Error messages

The Display Job (DSPJOB) command shows, for the specified job, any of the following information:

The information can be shown whether the job is on the job queue, on an output queue, or active in the system. Note, however, that 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:

  1. 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. More information about the job user identity is in the Work Management information in the iSeries Information Center at http://www.ibm.com/eserver/iseries/infocenter.

  2. Activation group information for a job cannot be shown if the job is being held when this command is run.

  3. This command fails in a job that allows multiple threads if OPTION(*FILOVR) or OPTION(*ALL) is specified.

Top


 

Parameters

Keyword Description Choices Notes
JOB Job name Single values: *
Other values: Qualified job name
Optional, Positional 1
Qualifier 1: Job name Name
Qualifier 2: User Name
Qualifier 3: Number 000000-999999
OUTPUT Output *, *PRINT Optional, Positional 2
OPTION Option *SELECT, *STSA, *DFNA, *RUNA, *SPLF, *JOBLOG, *PGMSTK, *JOBLCK, *LIBL, *OPNF, *FILOVR, *CMTCTL, *CMNSTS, *ACTGRP, *MUTEX, *THREAD, *MLBA, *ALL Optional
DUPJOBOPT Duplicate job option *SELECT, *MSG Optional

Top

 

Job name (JOB)

Specifies the name of the job whose information is to be shown.

Single values

*

The job whose information is displayed is the job from which this display command is run.

Qualifier 1: Job name

name

Specify the name of the job to be displayed. If no job qualifier is given, all of the 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 duplicates is displayed.

Qualifier 2: User

name

Specify the name that identifies the user profile under which the job is run.

Qualifier 3: Number

000000-999999

Specify the job number assigned by the system.

Top

 

Output (OUTPUT)

Specifies whether the output from the command is displayed at the requesting work station or printed with the job's spooled output.

*

The output is displayed for interactive jobs or printed with the job's spooled output for non-interactive jobs.

*PRINT

The output is printed with the job's spooled output.

Top

 

Option (OPTION)

Specifies which information is displayed.

*SELECT

The menu is shown and all options and function keys are available.

*STSA

The identifying characteristics and the status of the job are shown.

*DFNA

The definition attributes in the job description associated with the job are shown.

*RUNA

The run attributes for the job are shown.

*SPLF

The spooled files owned by the job are shown. Only those spooled output files which are on output queues in the library name space of the thread issuing this command will be shown.

*JOBLOG

The commands processed by the job and the messages returned from running those commands are shown.

*PGMSTK

All information for all programs in the call stack is shown.

*JOBLCK

All external object locks held by the job, including held locks and lock that are being waited for, are shown.

*LIBL

The library list for the thread is shown if the job specified for the Job name (JOB) parameter is the job from which the command is run. For other jobs, the library list of the initial thread is shown.

*OPNF

Files that are open for the job and the status of system and user files are shown.

*FILOVR

File overrides at any active call level for the job are shown.

*CMTCTL

The commitment control status of the job is shown.

*CMNSTS

The communications status of the job is shown.

*ACTGRP

The activation groups associated with the job are shown.

*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 options are shown.

Top

 

Duplicate job option (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.

Top


 

Examples

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.

Top


 

Error messages

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

Top