Command reference / job

WRKJOB

Work with Job

Lets you work with or change a user job's status and definition attributes, run attributes, spooled files, job log, call stack, job locks, library list, open files, file overrides, commitment control status, communications status, activation groups, mutexes, threads, media library attributes, and environment variables. Run attributes, call stack, job locks, library list, job log, open files, file overrides, commitment control, communications status, activation groups, mutexes, and threads are shown only while the job is active. Job status, definition attributes, and spooled file information are available whether the job is on a job queue, an output queue, or active in the system.

Allowed environments: *ALL. Positional parameters: 2.

Restrictions

Parameters

JOB Job name

Identifies the user job whose information you want to work with. If no qualifier is given, all jobs in the system are searched for the simple name; duplicates produce a list of qualified job names.

Type
*QUAL
Required
No
Default
*
Case
Uppercase

Suggested / special values: *

*
The job from which this command is run.
Qualified parts (object, then library; write LIBRARY/OBJECT)

Job name Job name

Type
*NAME
Required
No
Length
10
Case
Uppercase

User User

Type
*NAME
Required
No
Length
10
Case
Uppercase

Number Number

Type
*CHAR
Required
No
Length
6
Case
Uppercase

OUTPUT Output

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

Type
*CHAR
Required
No
Default
*
Length
6
Case
Uppercase

Allowed values: *, *PRINT

*
Displayed for interactive jobs, or printed with the job's spooled output for non-interactive jobs.
*PRINT
Printed with the job's spooled output.

OPTION Option

Specifies which information is being worked with.

Type
*CHAR
Required
No
Default
*SELECT
Length
7
Case
Uppercase

Allowed values: *SELECT, *STSA, *DFNA, *RUNA, *SPLF, *JOBLOG, *PGMSTK, *JOBLCK, *LIBL, *OPNF, *FILOVR, *CMTCTL, *CMNSTS, *ACTGRP, *MUTEX, *THREAD, *MLBA, *ENVVAR, *ALL

*SELECT
Shows the menu, with all options and function keys available.
*STSA
Shows the identifying characteristics and status of the job.
*DFNA
Shows the definition attributes in the job description associated with the job.
*RUNA
Shows the run attributes for the job.
*SPLF
Shows spooled files owned by the job, limited to output queues in the library name space of the issuing thread.
*JOBLOG
Shows commands processed by the job and the messages returned from them.
*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 library list for the thread if the job is the issuing job; otherwise, the library list of the initial thread.
*OPNF
Shows open files 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

Specifies a list of thread identifiers whose information is to be included.

Type
*CHAR
Required
No
Default
*INITIAL
Length
50
List limit
20
Case
Uppercase

Suggested / special values: *INITIAL, *CURRENT, *ALL, *SELECT

*ALL
All threads within the specified job are included.
*SELECT
Presents a list from which you can select up to twenty threads. Valid only in an interactive job.
*INITIAL
The initial thread within 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 by this command.

Type
*CHAR
Required
No
Default
*SELECT
Length
7
Case
Uppercase

Allowed values: *SELECT, *MSG

*SELECT
Shows a selection display when duplicates are found in an interactive session; otherwise a message is issued.
*MSG
Issues a message when duplicate jobs are found.

Examples

WRKJOB JOB(SMITH/PAYROLL) OUTPUT(*PRINT)

Prints information for job PAYROLL, submitted by user SMITH, to the job's output spooling queue.

WRKJOB OPTION(*SPLF)

Lets you work with the spooled output for the current job.

IBM command documentation

Generated from os/cl/catalog/WRKJOB.json and os/cl/help/WRKJOB.json.