Command reference / job
DSPJOB
Display Job
Shows, for a specified job, its status and definition and run attributes, spooled files, job log, call stack, locks, library list, open files, file overrides, commitment control and communications status, activation groups, mutexes, threads, media library attributes, and environment variables. This works whether the job is on a job queue, on an output queue, or active. A job is not in the system until all of its input has been read, and only then is an entry placed on the job queue. The QSYS2.STACK_INFO and QSYS2.OPEN_FILES table functions return similar information.
Allowed environments: *ALL.
Positional parameters: 2.
Restrictions
- The issuer must run under the same user profile as the job user identity of the displayed job, or have *JOBCTL special authority.
- Activation group information cannot be shown if the job is held when the command runs.
- The command fails in a job that allows multiple threads if OPTION(*FILOVR) or OPTION(*ALL) is specified.
- *SERVICE special authority is needed to display environment variables for a job running under a different user profile.
Parameters
JOB
Job name
Names the job whose information is shown. If no qualifier is given, all jobs in the system are searched for the simple name.
Suggested / special values:
*
*- The job from which this command is run.
Qualified parts (object, then library; write LIBRARY/OBJECT)
Job name
Job name
User
User
Number
Number
OUTPUT
Output
Says whether the output is shown at the requesting workstation or printed with the job's spooled output.
Allowed values:
*, *PRINT
*- Displayed for interactive jobs, or printed with spooled output for non-interactive jobs.
*PRINT- Printed with the job's spooled output.
OPTION
Option
Specifies which information is shown.
Allowed values:
*SELECT, *STSA, *DFNA, *RUNA, *SPLF, *JOBLOG, *PGMSTK, *JOBLCK, *LIBL, *OPNF, *FILOVR, *CMTCTL, *CMNSTS, *ACTGRP, *MUTEX, *THREAD, *MLBA, *ENVVAR, *ALL
*SELECT- Shows a menu in which all options and function keys are available.
*STSA- Shows the identifying characteristics and status of the job.
*DFNA- Shows the definition attributes from the job's associated job description.
*RUNA- Shows the run attributes for the job.
*SPLF- Shows the spooled files owned by the job that are on output queues in the issuing thread's library name space.
*JOBLOG- Shows the commands processed by the job and the messages they returned.
*PGMSTK- Shows all information for all programs in the call stack.
*JOBLCK- Shows all external object locks held by the job, including locks being waited for.
*LIBL- Shows the thread's library list if this is the issuing job; otherwise the initial thread's library list.
*OPNF- Shows files open for the job and the status of system and user files.
*FILOVR- Shows file overrides at any active call level for the job.
*CMTCTL- Shows the commitment control status of the job.
*CMNSTS- Shows the communications status of the job.
*ACTGRP- Shows the activation groups associated with the job.
*MUTEX- Shows mutex information for the job's initial thread.
*THREAD- Shows information about the job's threads.
*MLBA- Shows the job's media library attributes.
*ENVVAR- Shows the job's environment variables.
*ALL- Shows all options.
SLTTHD
Thread ID to include
Lists the thread identifiers whose information is included.
Suggested / special values:
*INITIAL, *CURRENT, *ALL, *SELECT
*ALL- All threads in the job are included.
*SELECT- Shows a list from which up to twenty threads can be selected. Valid only in interactive jobs.
*INITIAL- The initial thread of the job is included.
*CURRENT- The thread running the command is included. Valid only if the specified job is the job running the command.
DUPJOBOPT
Duplicate job option
Specifies the action taken when duplicate jobs are found.
Allowed values:
*SELECT, *MSG
*SELECT- Shows the selection display in an interactive session; otherwise a message is issued.
*MSG- Issues a message.
Examples
DSPJOB JOB(SMITH/PAYROLL) OUTPUT(*PRINT)
Sends the information for job PAYROLL submitted by user SMITH to the job's output spooling queue for printing.
DSPJOB OPTION(*SPLF)
Displays the spooled output for the current job.
DSPJOB OPTION(*ALL)
Displays all of the information for the current job.
Generated from os/cl/catalog/DSPJOB.json and os/cl/help/DSPJOB.json.