The following are programming considerations for Exit 56:
- Locating the JCT Control Block Extensions
You
can locate extensions to the job control table ($JCT) control block
from this exit using the $JCTXGET macro. For example, you can use
these extensions to retrieve job-related information from the $JCTX
control block to ship across the network in $NHD macro sections. For
more information, see z/OS JES2 Macros.
- Accessing $NITs
The
$NIT macro defines the characteristics of NJE nodes. The $NITs are
arranged in a table that is indexed by the node number. The table
of $NITs is in JES2 private storage and shadowed in a data space for
use outside the JES2 address space. Installation exits can use three
fields in the $NJEWORK work area to access the $NIT table. Installation
exits can use these fields to access a $NIT without regard for what
address space they are in.
Because these fields are in the $NJEWORK
data area, you can address them using the ‘NJE’ prefix or
the prefix for the device dependent work area in which the $NJEWORK
is embedded. Therefore, you can address NJENITAD as JRWNITAD in the
$JRW, JTWNITAD in the $NJT, SRWNITAD in the $SRW, and STWNITAD in
the $STW.
The following code accesses the origin node’s
NIT in an NJE JOB receiver exit:
USING NIT,R1 Est NIT addressability
SPACE 1
$ARMODE ON,SYSSTATE=SET,INIT=CCTZEROS Enter AR mode
SPACE 1
LLGH R1,JRWRDNOD Get origin node number
MH R1,CCTNITSZ Get NIT offset
AL R1,JRWNITBL Get NIT address
LAM AR1,AR1,JRWNITAL Get NIT ALET
- Determining the device type
Most exits need to determine the type of device that they are being
called under. The $NJEWORK area has copies of $DCT fields that can
help identify the device. Which method you use depends on the condition
that you are testing for.
The field NJEDEVTP (that corresponds
to DCTDEVTP) is a one byte flag that can be used to test for classes
of devices. A test of the DCTNET bit in NJEDEVTP indicates that the
exit is being called under a networking device. A compare of the byte
to DCTINR indicates that the exit is being called under an internal
reader. See the $DCT for the meaning of the bits in DCTDEVTP.
NJEDEVID
corresponds to DCTDEVID. This is a 3 byte value that can uniquely
identify a device. This is more often used when knowing what specific
device you are running under. See the $DCT for the meaning of the
fields.