Threadsafe restrictions
A TRUE running on an open TCB must not treat the executing open TCB environment in such a way
that it causes problems for:
- Other TRUEs running on open TCBs called by the same task
- OPENAPI programs called by the same task
- Application program logic that could run on the open TCB
- Future tasks that might use the open TCB
- CICS® management code.
In particular:
- When invoking CICS services, or when returning to CICS, A TRUE running on an open TCB must ensure it restores the MVS programming environment as it was on entry to the TRUE. This includes cross-memory mode, ASC mode, request block (RB) level, linkage stack level, TCB dispatching priority, in addition to cancelling any ESTAEs added.
- At CICS task
termination, A TRUE running on an open TCB must ensure it leaves the open TCB in a state suitable to
be reused by another CICS transaction. In particular, it must ensure that all non-CICS resources acquired specifically on behalf of the terminating task are freed. Such resources might include:
- Dynamically allocated data sets
- Open ACBs or DCBs
- STIMERM requests
- MVS managed storage
- ENQ requests
- Attached subtasks
- Loaded modules
- Owned data spaces
- Added access list entries
- Name/token pairs
- Fixed pages
- Security settings (TCBSENV must be set to zero)
- A TRUE running on an open TCB must not use the following MVS system services that will affect overall CICS operation:
- CHKPT
- ESPIE
- QEDIT
- SPIE
- STIMER
- TTIMER
- XCTL / XCTLX
- Any TSO/E services.
- A TRUE running on an open TCB must not invoke under the L8 mode TCB a Language Environment® program that is using MVS Language Environment services, because L8 mode TCBs are initialized for Language Environment using CICS services.