Initializing an exit and its exit routines involve
the use of the following JES2 initialization statements or JES2 commands:
- LOADMOD(jxxxxxxx) or $ADD LOADmod(jxxxxxx)
Use
the LOADMOD(jxxxxxxx) initialization statement or
the $ADD LOADmod(jxxxxxx) command to load the modules containing
your exit routines. The subscript of the LOADMOD initialization statement or the $ADD LOADmod(jxxxxxx) command specifies the
name of the module to be loaded as defined on the NAME control statement
for the linkage editor. The module must be named according to MVS™ naming
conventions. Exit routines to be called from the user or FSS environment
can be loaded into CSA or you can request the LPA version be used
by specifying the STORAGE=LPA | CSA parameter specification on the
LOADMOD(jxxxxxxx) initialization statement or the
$ADD LOADmod(jxxxxxx) command.
Exit routines to be called from the JES2 main task and subtask environments
should be loaded in the private area of the JES2 address space. To
place the load module either above or below 16 megabytes, use the
linkage editor MODE statement or specify the RMODE= parameter on the
$MODULE macro.
- $DEL LOADmod(jxxxxxxx) or $T LOADmod(jxxxxxxx),REFRESH
Use the $DEL LOADmod(jxxxxxxx) or the $T LOADmod(jxxxxxxx),REFRESH
command to delete or refresh the modules that contain your exit routines.
The subscript of the commands specifies the name of the module that
was previously loaded by a $ADD LOADmod(jxxxxxx) command, or a LOADMOD(jxxxxxxx)
initialization statement.
- EXIT(nnn) or $T EXIT(nnn),ROUtines=(xxxxxxxx)
command
Use the EXIT(nnn)
initialization statement or the $T EXIT(nnn),ROUtines=(xxxxxxxx)
command to associate one or more exit routines with an exit.
Replace nnn, the exit number, with the corresponding
exit identification number specified on the $EXIT macro or macros
that define the exit point or points that establish the exit. The
ROUTINES= parameter can then specify 1 to 255 exit routine names,
as specified on the $ENTRY macro symbol field or macros that identify
the corresponding exit routines. For example, you can specify EXIT(123)
ROUTINES=(rtn1, rtn2, rtn3). The JES2 exit effector calls multiple
exit routines in the sequence of their specification on the EXIT(nnn)
statement. If you specify more than one EXIT(nnn) statement with the
same identification number, JES2 honors the last statement it encounters
during initialization. This specification can be
changed post-initialization with the $T EXIT(nnn),ROUtines=(xxxxxxxx)
command. This command not only allows the complete replacement of
the list of routines associated with an exit, but also allows routines
to be added to or removed from the existing list. See z/OS JES2 Commands for more information about changing the list of routines associated
with an exit.
Note: The LOADMOD(jxxxxxxx) and EXIT(nnn) initialization
statements are not positional and do not have to be specified in any
required order.
JES2 associates an exit with a routine in the module
that was most recently loaded (by either a LOADMOD(jxxxxxxx) initialization
statement or a $ADD LOADmod(jxxxxxxx) command).
Note: A $ADD
LOADmod(jxxxxxxx) command does not automatically update the exits
which refer to routines in the newly loaded module. The exits must
be refreshed (by a $T EXIT(nnn),REFRESH command) or changed (by a
$T EXIT(nnn),ROUtines= command) to use those routines.
However, a refresh is not needed to update dynamic
tables. Dynamic tables are automatically added, deleted, or refreshed
when the applicable JES2 command is issued. In addition, a refresh
is not needed to update exits that refer to routines in a deleted
or refreshed module. When an exit is associated with a routine that
resides in a deleted module, even if the module resides in LPA, the
routine will no longer be invoked for the exit (routine address of
the exit is nullified). When an exit is associated with a routine
that resides in a refreshed module, if the routine exists in the newly
loaded module, the routine in the newly loaded module will be invoked
for the exit; if the routine is absent in the newly loaded module,
the routine will no longer be invoked for the exit.
In all cases, a $T EXIT(nnn),REFRESH command refreshes
those exits so that they will invoke routines in the most recently
loaded module.
Figure 1 illustrates the primary
parts of JES2 and their location in storage when initialization completes.
- A
- User environment
- B
- User environment
- C
- JES2 main task and subtasks
Figure 1. Exit Placement