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


$JCTXEXP – Expand a $JCT Control block extension

z/OS JES2 Macros
SA32-0996-00

Use the $JCTXEXP macro to extend the $JCT (Job Control Table) control block by a length and a unique identifier specified by your installation. You cannot specify a length shorter than the original extension. The extension can be a SPOOLed or a local extension. If you specify a shorter length, JES2 returns the length of the original extension. See Using the $JCTX macro extension service for more information.

Format description

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

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

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

>--+-------------------------------------------------+---------><
   '-,--NOTFOUND--=--rx-addr--,--NOSPACE--=--rx-addr-'   

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

This parameter is required.

ERRET=
Specifies the label to receive control if the extension cannot be expanded for a reason other than those specified through the NOTFOUND= 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 NOTFOUND= parameter, ERRET= specifies the label to receive control if the extension does not exist. If you do not specify a value for the NOSPACE= parameter, ERRET= specifies the label to receive control if the extension cannot be expanded 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 total length of the $JCT control block extension after expansion. Specify the total length of the extension. For example, if the original extension was 20 bytes long and this expansion adds an additional 10 bytes, specify 30 bytes for this parameter. This specification must include the length of the $JCTX prefix area (defined by the value of the 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 expands the extension successfully; R1 points to the new section on return.

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

NOTFOUND=
Specifies the label to receive control if the extension could not be expanded because it does not exist; R1 points to the existing section on return.

If you do not specify this parameter, NOTFOUND= 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 expand this extension.

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

Return codes

The following return codes (in decimal) are returned in register 15.
Return Code
Meaning
0
JES2 successfully expanded the extension. R1 points to the new extension (corresponding to the OKRET= parameter).
4
JES2 did not expand the extension because an extension with the specified type and modifier already exists. This return code corresponds to the NOTFOUND= parameter.
8
JES2 did not expand 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 expand 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.

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

        $JCTXEXP TYPE='USER',
               MOD=1,
               JCT=JCT,
               LENGTH=JCXLEN1,
               ERRET=EXTERR
This macro expands 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 should 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).

For sample definitions, see Example.

If the extension is successfully expanded, 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