SYSFILE environment
The RDATA and WRTRD macros generate wait states and, when processed, follow corresponding rules for using process levels and call hierarchies due to the link with break/escape processing (K2 key). Thus, correct execution of these functions can only be ensured in the case of a call from the TU state.
Like RDTAT/WRTRD, the WROUT macro requires an initialized SYSFILE environment.
DCAM calls
The DCAM calls cannot be used in the TPR state and are thus not applicable in system exits, because their execution causes a modification of process levels and involves the use of TPR contingencies. For this reason, the SVC itself must be called from a process level < 156 (=TU state).
ISAM SVCs
As a rule, the ISAM SVCs 32 and 168 can be used in system exits. However, take note of the following with regard to the SVC 168 in SHARUPD mode:
Most ISAM macros result in a release of external ISAM locks held by the job, so that only one lock is ever held and deadlock-free processing is ensured. Thus, a lock set by an application program may be reset by an ISAM call in a system exit without the application program noticing it.
Example
Application program: | GET | FCB1,AREA1,LOCK |
System exit: | GET | FCB2,AREA2,LOCK |
Application program: | PUTX | FCB1,AREA1 |
The PUTX macro is correctly executed without a system exit; with a system exit the lock is released and unpredictable results may occur.
For this reason, ISAM macros capable of releasing a lock should only be called in system exits during shared update processing when it is ensured that no application program is loaded. Even in this case, you must make sure that there is no undesired interaction with system files.
24-bit ISAM SVCs should no longer be used in system exits. Their use in an XS environment causes an error immediately, since system exits run in a TPR environment, i.e. in 31-bit mode.
JMS/JV SVCs
The JMS/JV SVCs are in a TPR environment, which means that they are executable in system exits. However, they do not always return meaningful results (e.g. the JINF macro does not if there is no task environment).
DSSM/SULNK
Only the SULNK interface is usable if the system exits have been loaded into privileged memory by DSSM or SULNK. If the system exits are loaded into nonprivileged memory, the SVCs VSVI, PBUNLD, ITABL, TABLE and LINK can be used. The $LOAD macro cannot be used.