Where allowed to run: All environments (*ALL) Threadsafe: No |
Parameters Examples Error messages |
The Hold Job (HLDJOB) command makes a job ineligible for processing by the system. The job is held until it is:
Holding a job causes all threads within the job to be held.
Note: If you use this command to hold a job that has exclusive access to any resources on the system, these resources are not available to other jobs. Other jobs which require access to those resources will either fail or wait indefinitely.
Restrictions: 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 held, 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. It is described in more detail in the Work Management book.
Top |
Keyword | Description | Choices | Notes |
---|---|---|---|
JOB | Job name | Qualified job name | Required, Positional 1 |
Qualifier 1: Job name | Name | ||
Qualifier 2: User | Name | ||
Qualifier 3: Number | 000000-999999 | ||
SPLFILE | Hold spooled files | *NO, *YES | Optional, Positional 2 |
DUPJOBOPT | Duplicate job option | *SELECT, *MSG | Optional |
Top |
Specifies the name of the job being held.
This is a required parameter.
Qualifier 1: Job name
Qualifier 2: User
Qualifier 3: Number
Note: If no user name or job number is specified, all jobs currently in the system are searched for the job name. If more than one occurrence of the specified name is found, a qualified job name must be provided either explicitly or through the selection display. Refer to the Duplicate job option (DUPJOBOPT) parameter for more information.
Top |
Specifies whether spooled output files created by the job being held are also held.
Top |
Specifies the action taken when duplicate jobs are found by this command.
Top |
Example 1: Making a Job Ineligible for Processing
HLDJOB JOB(PAYROLL) SPLFILE(*YES)
This command makes the job named PAYROLL ineligible for processing. All spooled files for this job are also held.
Example 2: Holding a Job that has a Duplicate Name
HLDJOB JOB(DEPTXYZ/PAYROLL)
This command holds the job named PAYROLL submitted by a user operating under the user profile DEPTXYZ. The qualified form of the job name is used when jobs with duplicate names exist in the system. Spooled files are not held.
Top |
*ESCAPE Messages
Top |