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
- The issuer must be running under a user profile that matches the job user identity of the job being held, or must have job control (*JOBCTL) special authority.
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.
Qualified parts (object, then library; write LIBRARY/OBJECT)
Job name
Job name
User
User
Number
Number
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.
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.
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.
Generated from os/cl/catalog/HLDJOB.json and os/cl/help/HLDJOB.json.