A precondition for this function is that the subsystem is active.
A subsystem can be deactivated in the following ways:
explicitly when the STOP-SUBSYSTEM command is entered (HOLD-SUBSYSTEM suspends the subsystem)
explicitly when privileged macros are called at the program interface ($ESMDEL and $ESMHLD)
implicitly when a START-SUBSYSTEM command is entered with the operand VERSION-PARALLELISM=*EXCHANGE-MODE
automatically at shutdown, for all subsystems whose definitions include such a declaration (STOP-AT-SHUTDOWN=*YES)
Deactivation of a subsystem (STOP-SUBSYSTEM) takes place in the following steps:
The job is checked, in particular the dependencies on other subsystems (synchronous).
The CLOSE-CTRL routine is started, provided one is defined (asynchronous).
The subsystem is closed for new users (asynchronous), preventing the connection of any further tasks to the subsystem (except for those with entry points with CONNECTION-SCOPE=*FREE or SVC/ISL calls for subsystems with entry points with CREATION-TIME=*AT-SUBSYSTEM-CALL).
From this moment on, it is no longer possible to access code that has an entry point defined with CONNECTION-SCOPE=*OPTIMAL.The job termination routine (STOPCOM routine), if defined, is started (asynchronous).
Wait until the subsystem is jobless, i.e. the subsystem-specific connection counter is 0 and no task is accessing code that has an entry point defined with CONNECTION-SCOPE=*OPTIMAL (asynchronous). Exception: if the operand FORCED=*YES is specified in the DSSM command, deinitialization is started immediately.
Deinitialization, if defined, is started (asynchronous).
Unloading from the holder task (asynchronous).
A subsystem hold (HOLD-SUBSYSTEM) consists of steps 1 through 6.
If the deactivation or suspension of a subsystem is initiated explicitly via the STOP-SUBSYSTEM or HOLD-SUBSYSTEM command, the synchronous processing mode can be selected instead of the asynchronous mode.