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


$JCTXADD – Add a $JCT control block extension

z/OS JES2 Macros
SA32-0996-00

Use the $JCTXADD macro to extend the $JCT (Job Control Table) control block based on a length and a unique identifier specified by your installation. See Using the $JCTX macro extension service for more information.

Format description

Read syntax diagramSkip visual syntax diagram
>>-$JCTXADD--JCT--=--rx-addr--,--TYPE--=--+-'xxxx'--+----------->
                                          '-rx-addr-'   

>--,--MOD--=--value--,--LENGTH--=--value------------------------>

>--+-,--OKRET--=--rx-addr--+----------------------+-+----------->
   |                       '-,--ERRET--=--rx-addr-' |   
   '-,--ERRET--=--rx-addr--+----------------------+-'   
                           '-,--OKRET--=--rx-addr-'     

>--+----------------------+--+------------------------+--------->
   '-,--FOUND--=--rx-addr-'  '-,--NOSPACE--=--rx-addr-'   

>--+----------------------+------------------------------------><
   |            .-SPOOL-. |   
   '-,--LOC--=--+-LOCAL-+-'   

JCT=
Specifies the address of the $JCT control block to which JES2 should add this extension.

This parameter is required.

ERRET=
Specifies the label to receive control if the extension cannot be added for a reason other than those specified through the FOUND= or NOSPACE= parameter (for example, the JCT= parameter does not point to a valid $JCT control block).

If you do not specify a value for the FOUND= parameter, ERRET= specifies the label to receive control if the extension cannot be added because an extension with a matching type and modifier already exist. If you do not specify a value for the NOSPACE= parameter, ERRET= specifies the label to receive control if the extension cannot be added because the $JCT is too small.

You must specify the ERRET= parameter, the OKRET= parameter, or both.

TYPE=
Specifies either a 1 to 4-character string enclosed in quotation marks (‘xxxx’), or the address of a 4-byte field containing such a string, to serve as an identifier for the extension. The strings ‘IBM’ and ‘JES2’ are reserved for IBM® use.
Note: JES2 pads character strings of less than 4 characters with trailing blanks.
MOD=
Specifies a value (0-32767) that allows an application to specify a series of extensions to the $JCT from a single source (through the TYPE= parameter) and to differentiate extensions through this parameter.
MOD= can be specified as:
  • A numeric value
  • A symbol equated to a value
  • A register containing a value
  • The address of a 2-byte field containing the value

This parameter is required.

LENGTH=
Specifies the length of the extension (0-4095) to be added to the $JCT control block. This specification must include the length of the $JCTX prefix area (defined by the value of JCXORG-JCTX field).
The LENGTH= parameter can be specified as:
  • A numeric value
  • A symbol equated to a value
    Note: Use an equate to define a field - field value:
    JCTXULEN EQU   JCTXUEND-JCTX
    Then specify the value for length in the macro:
    LENGTH=JCTXULEN

    If you specify the field - field expression in the macro rather than using an equate to define the expression, JES2 uses the relocatable address from the expression rather than the value.

  • A register containing a value
  • The address of a 2-byte field containing the length.
The maximum size depends on the:
  • $JCT size (IBM provides a 512-byte spool buffer; any additional space might not be preserved from release to release. To determine the amount of spool used by $JCT extensions, see Using the $JCTX macro extension service.)
  • Buffer size (BUFSIZE= parameter on the SPOOLDEF initialization statement)
  • Number of extensions already defined in the $JCT control block.

This parameter is required.

OKRET=
Specifies the label to receive control if JES2 adds the extension successfully; R1 points to the new section on return.

You must specify the OKRET= parameter, the ERRET= parameter, or both.

FOUND=
Specifies the label to receive control if an extension with a matching type and modifier already exists in the $JCT control block; R1 points to the existing section on return.

If you do not specify this parameter, FOUND= defaults to the value of the ERRET= parameter.

NOSPACE=
Specifies the label to receive control if there is insufficient space in the $JCT control block to add this extension.

If you do not specify this parameter, NOSPACE= defaults to the value of the ERRET= parameter.

LOC=
Specifies whether or not the extension should be SPOOLed.

LOC can be specified as:

  • SPOOL
  • LOCAL

LOC=SPOOL places the extension in the SPOOLed portion of the JCT. LOC=LOCAL places the extension in working storage that is not SPOOLed.

Local extensions are only supported in certain environments. Every extension must have a unique TYPE/MOD irrespective of the extension's location. Default is LOC=SPOOL.

Return codes

The following return codes (in decimal) are returned in register 15.
Return Code
Meaning
0
JES2 successfully added the extension. R1 points to the new extension (corresponding to the OKRET= parameter).
4
JES2 did not add the extension because an extension with the specified type and modifier already exists. R1 points to that extension (corresponding to the FOUND= parameter).
8
JES2 did not add the extension because there was insufficient space in the $JCT control block for the extension. This return code corresponds to the NOSPACE= parameter.
12
JES2 did not add the extension for one of the following reasons:
  • An error was detected in the $JCT control block.
  • An error was detected in the $JCTX control block.
  • An input parameter was specified incorrectly.
  • Local extensions was not allowed for passed JCT.

This return code corresponds to the ERRET= parameter.

Environment

Authorization:
Supervisor state, key 0 or 1.
Dispatchable unit mode:
Task
JES environment:
Any JES2 environment
Cross Memory Mode:
PASN = HASN
AMODE:
24- or 31- bit
ASC mode:
Primary
Interrupt status
Enabled for I/O and external interrupts
Serialization:
The $JCT control block must be serialized; this could mean that the caller has to obtain the job lock or the SJB lock.
Locks:
No locks are obtained or freed by the $JCTXADD macro.
Control parameters:
None

Programming requirements

You must specify $HCCT, $JCTX, and $TRE on the $MODULE invocation to use this macro.

Restrictions

None.

Registers on entry

R0 - R10:
N/A
R11:
HCT, HCCT, or HFCT, depending on JES2 environment.
R12:
N/A
R13
Address of PCE or address of an available 72-byte save area
R14-15:
N/A

Registers on exit

R0:
Used as a work register by the system.
R1:
Pointer to the $JCT control block extension, or 0.
R2 - R13:
Unchanged
R14
Used as a work register by the system.
R15:
Return code

Example

        $JCTXADD TYPE='USER',
               MOD=1,
               JCT=JCT,
               LENGTH=JCXLEN1,
               FOUND=ADDOK,
               ERRET=EXTERR

ADDOK    DS    OH

JCTX     DSECT
         ORG   JCTXORG

JCTXLEN1 EQU   *-JCTX     Installation fields for extension 1
         ORG   JCXORG

JCTXLEN2 EQU   *-JCTX     Installation fields for extension 2
         ORG   JCXORG
This macro creates an extension with a type of ‘USER’ and a modifier of 1. The $JCT address is in a register with a USING for the $JCT. The length value must include the following:
  • The JES2-defined header's length (containing an eyecatcher, the ID, and the extension's length)
  • The length of any installation fields to be added to the extension. (Begin all installation fields at label JCXORG).

If the extension is successfully added (or already exists in the $JCT), processing continues at the next sequential instruction. Otherwise, processing continues at label EXTERR.

Go to the previous page Go to the next page




Copyright IBM Corporation 1990, 2014