content_image/971501.jpg
<img src='content_image/971501.jpg'>

JES2 can install or activate a maximum of 256 exits. EXIT 1 - EXIT 60 are provided by IBM, although the samples do not always correspond to what is expected as good examples. 

The exits have their own macros (usually $xxx) and these macros can cause problems when used with MVS macros. In exit 6, we wanted to use the Macro TCB. A collision occurred because parts of the TCB macro are used in the JES2 macros, which did not display the HLASM during the assembly. Instead, it stopped the assembly without writing out any warning. 

The JES2 control blocks, which are described in the JES2 Data Areas manuals, are a good way to access important data. In the JES2 exits, for example, the JOBNAME can be found by using the field JCTJNAME, which completely replaces the variant to be run by using MVS control blocks. 

The exits can also change data in the control blocks or pass data on to the following exits; for example, JCTXMASK in the JCT, which can be changed by each exit (for example, EXIT 52). We attempted to avoid a GETMAIN or STORAGE OBTAIN in all our previously programmed exits because this configuration seemed to us to be a considerable burden for the systems with the expected exit calls. 

Because the exits need many registers (GPR or GR) for addressing JES2 control blocks, one should have more than 16 registers available for programming. 

In programs that do not run in AMODE 64, the right part of the registers (bit 32 - 63) can be moved to the left part (bit 0 - 31) with the OP instructions SLLG or SRLG to save the registers. We used this kind of register storage several times in exits 52, 54, and 6. 

Attention:  Because exits are also used with the TSO Logon, it might be impossible to perform a logon in the TSO in certain situations. 

