Hold Job Queue (HLDJOBQ)

The Hold Job Queue (HLDJOBQ) command prevents the processing of all jobs currently waiting on the job queue and of all jobs that are added to the queue after the command is issued. This command has no effect on jobs that are running. Additional jobs can be placed on the job queue while it is held, but they are not processed. The jobs are held until a Release Job Queue (RLSJOBQ) command is issued. When a job queue is held, the jobs can be cleared with the Clear Job Queue (CLRJOBQ) command or a specific job can be canceled by the End Job (ENDJOB) command.

Restriction: The QLPINSTALL job queue cannot be held.

Parameters

Keyword Description Choices Notes
JOBQ Job queue Qualified object name Required, Positional 1
Qualifier 1: Job queue Name
Qualifier 2: Library Name, *LIBL, *CURLIB

Job queue (JOBQ)

Specifies the job queue that will have its current and future entries withheld from further processing.

This is a required parameter.

Qualifier 1: Job queue

name
Specify the name of the job queue to be held.

Qualifier 2: Library

*LIBL
All libraries in the library list for the current thread are searched until the first match is found.
*CURLIB
The current library for the job is used to locate the job queue. If no current library entry exists in the library list, QGPL is used.
name
Specify the name of the library where the job queue is located.

Examples

HLDJOBQ   JOBQ(QBATCH)

This command prevents the processing of the jobs currently on the QBATCH job queue and any jobs added to the queue. They are held until the queue is released or cleared. Individual jobs can also be ended with the ENDJOB command, which removes the job from the job queue.

Error messages

*ESCAPE Messages

CPF2207
Not authorized to use object &1 in library &3 type *&2.
CPF2240
User &7 not authorized to use *&5 &6/&4.
CPF3307
Job queue &1 in &2 not found.
CPF3330
Necessary resource not available.
CPF3425
Job queue &1 in &2 already held.