z/OS JES2 Macros
Previous topic | Next topic | Contents | Contact z/OS | Library | PDF


$QUEUE – Maintain a first–in–first-out (FIFO) queue

z/OS JES2 Macros
SA32-0996-00

Use $QUEUE to build, add an element to, or get an element from a FIFO queue. This macro provides an easy method of maintaining queues for any purpose.

Format description

Read syntax diagramSkip visual syntax diagram
>>-+--------+--$QUEUE--ACTION--=--+-ADD----+-------------------->
   '-symbol-'                     +-BUILD--+   
                                  '-DELETE-'   

>--+-------------------------------+--+--------------------+---->
   '-,--ELEMENT--=--+-addr-------+-'  '-,--ERROR--=--label-'   
                    '-(--R--n--)-'                             

>--,--HEAD--=--+-addr-------+--+------------------------+------><
               '-(--R--n--)-'  |                .-251-. |   
                               '-,--SUBPOOL--=--+-nnn-+-'   

ACTION=ADD|DELETE|INIT
Specifies the action you want $QUEUE to perform. The actions are:
Action
Meaning
ADD
Requests $QUEUE to add an element to the end of the queue.
BUILD
Requests $QUEUE to build a new queue including all the necessary chaining fields.
DELETE
Requests $QUEUE to take an element from the end of the queue and place the address of the element into register 1. If the queue is empty when you specify ACTION=DELETE, register 1 will contain a 0.
Note: ACTION= is a required keyword.
ELEMENT=addr|(Rn)
Specifies the address, or a register that contains the address, of the element you want to add to the queue.

$QUEUE uses registers 0, 1, 14, and 15 as work registers. Do not use these registers as values for ELEMENT=. This keyword is valid and required only if you specify ACTION=ADD.

ERROR=label
Specifies the label of the routine which receives control if there is an error in the queue. If you do not specify ERROR=, JES2 does not process queue errors.
HEAD=addr|(Rn)
Specifies the address, or a register that contains the address, of the queue head.
Note: If specified as an address, $QUEUE places the address in register 2. In this case, do not specify ELEMENT=(R2).

$QUEUE uses registers 0, 1, 14, and 15 as work registers. Do not use these registers as values for HEAD=.

Note: HEAD= is a required keyword.
SUBPOOL=nnn|251
Specifies the subpool from which to obtain the storage for the queue elements. This keyword is valid only if you specify ACTION=BUILD.

Environment

  • All environments.
  • MVS™ and $WAITs will not occur.

Go to the previous page Go to the next page




Copyright IBM Corporation 1990, 2014