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


$DOGDJB – Deliver or Get DJB

z/OS JES2 Macros
SA32-0996-00

This macro invokes the DJB (duplicate job block) processing services to perform one of the following functions:

FETCH
Returns a copy of the DJB in a work area.
FETCHNEXT
Returns a copy of the next DJB in a work area.
RETURN
Returns the DJB to the checkpoint.
FREE
Removes the DJB from the checkpoint.

Format description

Read syntax diagramSkip visual syntax diagram
>>-+--------+--$DOGDJB------------------------------------------>
   '-symbol-'            

>--ACTION--=--+-+---+--FETCH--+---------+--+---+-----+---------->
              | '-(-'         +-,READ---+  '-)-'     |   
              |               +-,UPDATE-+            |   
              |               '-,CREATE-'            |   
              +-+---+--FETCHNEXT--+---------+--+---+-+   
              | '-(-'             +-,READ---+  '-)-' |   
              |                   '-,UPDATE-'        |   
              +-+---+--RETURN--+-----------+--+---+--+   
              | '-(-'          '-,NOUPDATE-'  '-)-'  |   
              +-+---+--SETACCESS--+---------+--+---+-+   
              | '-(-'             +-,READ---+  '-)-' |   
              |                   '-,UPDATE-'        |   
              +-FREE---------------------------------+   
              '-RESET--------------------------------'   

>--+----------------------+--+--------------------+------------->
   '-,JOBNAME--=--jobname-'  |            .-NO--. |   
                             '-,CACHE--=--+-YES-+-'   

>--+--------------------+--+-------------------+---------------->
   '-,DSERV--=--cb_addr-'  '-,DJB--=--djb_addr-'   

>--+----------------------+--+----------------------------+----->
   '-,ERRET--=----label---'  |               .-POSSIBLE-. |   
                             '-MOREBERTS--=--+-NEVER----+-'   

>--+----------------------+--+------------------+--------------><
   '-,OKRET--=----label---'  |          .-YES-. |   
                             '-WAIT--=--+-NO--+-'   

ACTION=
The action to be taken. ACTION= is a required keyword. The following values are the valid values for ACTION=:
(FETCH,READ|UPDATE|CREATE)
Request that the DJB for the specified jobname be returned. READ gets a read-only copy of the DJB. UPDATE gets a copy that can be updated and locks it through the BERT lock. CREATE gets an UPDATE DJB asking that one be created if none exists yet. If none of READ, UPDATE, or CREATE is specified, READ is assumed. UPDATE is not allowed if DSERV= is specified.
(FETCHNEXT,READ|UPDATE)
This action performs an implicit DELIVER of the current CB into the BERT and then FETCH the next BERT in the chain. The READ and UPDATE options apply to the FETCH part of the operation.
RETURN
Requests that the DJB be unlocked, the NEW values in the DJB written to the checkpoint, and the storage freed. NOUPDATE requests that the new values are not to be written.
(SETACCESS, UPDATE|READ)
Requests that the DJB mode be changed to UPDATE or READ. This requires that a DJB address is specified on DJB=.
FREE
The BERTs associated with this DJB are freed.
RESET
Requests that the READ mode DJB cache be freed.
JOBNAME=
The jobname for which the DJB is to be obtained.
CACHE=
Specifies whether (YES) or not (NO) to manage the DJB by using the read-mode cache. CACHE is valid only when ACTION=FETCH is specified. NO is the default.
YES
Manages this DJB by using the read-mode cache. If a DJB address is given when ACTION=(FETCH), the DJB address that is returned in R1 might differ from the given DJB address. If a $WAIT occurs while a READ mode DJB is active, the DJB can be returned during the $WAIT.
NO
Do not use the read-mode cache to manage the DJB.
DSERV=
Address of the DSERV control block for the checkpoint version to be used. If DSERV= is not specified, the real CKPT is used. DSERV= is required if this is not the main task and not allowed if it is the main task. DSERV= is only valid for ACTION=FETCH or ACTION=(FETCH,READ).
DJB=
Address of DJB to return (RETURN), or storage into which the DJB should be placed (FETCH), or the DJB whose access mode is changed (SETACCESS).
ERRET=
Default error branch label.
MOREBERTS=
Specifies the action to take for BERTs. MOREBERTS= is not valid if ACTION=RETURN or ACTION=FETCHNEXT is specified. POSSIBLE is the default.
POSSIBLE
Indicates that the maximum number of BERTs that might be needed are obtained before the DJB is returned.
NEVER
Indicates that sufficient BERTs are already assigned for the DJB to return.
OKRET=
Normal return branch label.
WAIT=
Specifies whether (YES) or not (NO) the caller can $WAIT when the DJB is returned. WAIT= can be specified for ACTION=(FETCH,UPDATE), ACTION=(FETCH,CREATE), or ACTION=(FETHNEXT,UPDATE). WAIT= is not valid if DSERV= is specified. YES is the default.
YES
Indicates that the caller can $WAIT when the DJB is returned.
NO
Indicates that the caller cannot $WAIT when the DJB is returned. If there are not enough BERTs for a maximum sized DJB to return, no DJB is obtained and the return code is set to 8.

Environment

All actions are available in the JES2 Main task. FETCH for READ access is available in USER, SUBTASK and FSS environment.

Registers on entry

R0 - R10:
N/A
R11:
HCT or HCCT, depending on JES2 environment (JES2 main task or USER environment).
R12:
N/A
R13
PCE address or usable save area, depending on JES2 environment (JES2 Main task or USER environment).
R14 - R15:
N/A

Registers on exit

R0:
Unchanged
R1:
DJB address
R2 - R13:
Unchanged
R14
Destroyed
R15:
Return code

Return codes

The following return codes (in decimal) are returned in register 15.
Return Code
Meaning
0
DJB processed successfully
4
DJB not found
8
DJB not returned because of insufficient BERTs

Go to the previous page Go to the next page




Copyright IBM Corporation 1990, 2014