Exit routines are subsystems.
With the aid of the functions provided by the Dynamic SubSystem Management (DSSM) systems support can create, suspend, resume or delete subsystems during the session.
SSCM (Static Subsystem Catalog Management) generates a static subsystem catalog (SSMCAT), in which the subsystem configuration is defined. This subsystem catalog is loaded by DSSM during system initialization. The act of loading transforms the static subsystem catalog into a dynamic subsystem catalog.
During the session the subsystem catalog can be managed by means of the DSSM command ADD-SUBSYSTEM.
Subsystems can be managed dynamically by means of the commands START-SUBSYSTEM, HOLD-SUBSYSTEM, RESUME-SUBSYSTEM, REMOVE-SUBSYSTEM and STOP-SUBSYSTEM.
Systems support can request information on subsystems by means of the SHOW-SUBSYSTEM-STATUS command.
A logging function for diagnostic purposes can be activated by means of the SET-DSSM-OPTIONS command.
If system exit routines contain entry points which are resolved in other subsystems, they must be included in the subsystem declaration by means of the REFERENCE-SUBSYSTEM operand in the SET-SUBSYSTEM-ATTRIBUTES statement.
If system exit routines use privileged interfaces which are linked to a subsystem (e.g. with SPOOL), the subsystem has to be terminated explicitly before shutdown by means of STOP-SUBSYSTEM.
More detailed information on DSSM and the commands can be found in the manuals “Subsystem Management” [16] and “Commands” [8].
Example
The EXJOI010 exit routine is to be declared as a subsystem. Default values are not specified in the statements; the statements are described in the manual “Subsystem Management” [16] :
/START-SSCM ——————————————————————————————————————————————————————————— (1) //START-CATALOG-CREATION CATALOG-NAME=$TSOS.SSMCAT.NEW ———————————————— (2) . . . //SET-SUBSYSTEM-ATTRIBUTES - // SUBSYSTEM-NAME=EXJOIN(VERSION=01.0),LIBRARY=EXLIB, - ————————————— (3) // REP-FILE=*NO,DYNAMIC-CHECK-ENTRY=*NO, - // CREATION-TIME=*AFTER-SYSTEM-READY, - // MEMORY-CLASS=*SYSTEM-GLOBAL(SUBSYSTEM-ACCESS=*SYSTEM), - ————————— (4) // SUBSYSTEM-ENTRIES=EXJOI010( - ———————————————————————————————————— (5) // MODE=SYSTEM-EXIT(NUMBER=10), - // CONNECTION-ACCESS=*SYSTEM, - // CONNECTION-SCOPE=*FREE),- ————————————————————————————————————— (6) // LINK-ENTRY=EXJOIN(AUTOLINK=*ALLOWED) ————————————————————————————— (7) . . . //CHECK-CATALOG //SAVE-CATALOG //END
(1) | The SSCM subsystem to generate a static subsystem catalog (SSMCAT) is called. |
(2) | The file which is to accept SSMCAT is defined. |
(3) | The fixed attributes specific to the subsystem are defined. The name of the subsystem (EXJOIN) is freely selectable. |
(4) | Address space information. The exit routine is loaded in the privileged system address space. |
(5) | Definition of the entry point (EXJOI010), subsystem type (system exit) and exit number; only privileged programs have access authorization. |
(6) | In addition, the operand |
(7) | Control of the linkage editor run during generation of the EXJOIN subsystem. |
According to the subsystem declaration in the example above, the exit routine is started automatically after system ready (CREATION-TIME=*AFTER-SYSTEM-READY
operand).
If CREATION-TIME=*AT-CREATION-REQUEST
was defined, the exit routine must be made available in the system with:
/START-SUBSYSTEM SUBSYSTEM-NAME= EXJOIN
The exit routine is placed in the wait state with the following command:
/HOLD-SUBSYSTEM SUBSYSTEM-NAME=EXJOIN
The suspended exit routine can be reactivated with the following command:
/RESUME-SUBSYSTEM UBSYSTEM-NAME=EXJOIN
The command
/STOP-SUBSYSTEM SUBSYSTEM-NAME=EXJOIN
causes deactivation of the exit routine and the release of the reserved memory space.
The HOLD and DELETE functions first lock the exit routine against other calls and then wait until the last caller has left the routine; only then is the required function carried out.
Information on the current status of the exit routine can be requested with the following command:
/SHOW-SUBSYSTEM-STATUS SUBSYSTEM-NAME=EXJOIN
The active version of the exit routine could be replaced by a new version. This depends on the declaration of the new version with attribute VERSION-EXCHANGE=*ALLOWED
The command is:
/START-SUBSYSTEM SUBSYSTEM-NAME=EXJOIN,
VERSION=''02.2',VERSION=PARALLELISM=*EXCHANGE-MODE