Command reference / job

HLDJOB

Hold Job

Makes a job ineligible for processing by the system. The job stays held until it is released by the Release Job (RLSJOB) command, cleared by the Clear Job Queue (CLRJOBQ) command, ended by the End Job (ENDJOB) command, or ended while active by the End Subsystem (ENDSBS), End System (ENDSYS), or Power Down System (PWRDWNSYS) command. Holding a job holds all threads within it. If the held job has exclusive access to system resources, other jobs needing those resources will fail or wait indefinitely.

Allowed environments: *ALL. Positional parameters: 2.

Restrictions

Parameters

JOB Job name

Specifies the name of the job being held. This is a required parameter. The job name can be qualified with a user name and a system-assigned job number (000000-999999); if these are omitted, all jobs are searched and a qualified name is needed when duplicates exist.

Type
*QUAL
Required
Yes
Case
Uppercase
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

SPLFILE Hold spooled files

Specifies whether spooled output files created by the job are also held. Only files on output queues in the library name space of the thread issuing the command are held.

Type
*CHAR
Required
No
Default
*NO
Length
4
Case
Uppercase

Allowed values: *NO, *YES

*NO
The spooled output files produced by the job are not held.
*YES
The spooled output files produced by the job are also held.

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
In an interactive session, the selection display is shown when duplicate jobs are found; otherwise a message is issued.
*MSG
A message is issued when duplicate jobs are found.

Examples

HLDJOB JOB(PAYROLL) SPLFILE(*YES)

Makes the job named PAYROLL ineligible for processing. All spooled files for this job are also held.

HLDJOB JOB(DEPTXYZ/PAYROLL)

Holds the job named PAYROLL submitted by a user operating under the user profile DEPTXYZ. The qualified form is used when jobs with duplicate names exist. Spooled files are not held.

IBM command documentation

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