Thread termination

Thread termination occurs when a transaction is completed or is being terminated. This is done through the thread termination call from CICS® to the Language Environment-CICS interface module. All thread level clean-up, such as freeing the acquired storage, occurs at this stage. Language Environment resets the thread token back to 0 at completion of the thread termination. The language-specific thread termination also occurs at this stage.

Usage Notes:
  1. CICS issues the thread termination call if, and only if, a nonzero thread token has been returned to CICS by Language Environment at thread initialization. The same applies to the member languages.
  2. Language Environment processing assumes that there will never be a scenario needed where a process might 'switch' to non-reusable after being initialized reusable.

Syntax

Call CEECCICS (21, rsncode, syseib, preasa, ptoken, ttoken) Retcode (rc)

rsncode (output)
A fullword integer in nnnffrr format to contain the member language-specific thread termination reason code or one of the following Language Environment reason codes:
12100
Invalid parameter was passed
12110
Active run unit(s) were detected
12130
Language-specific thread termination was not done
syseib
The system EXEC interface block, as defined by CICS. Its address is above 16M.
preasa
A preallocated save area supplied by CICS. The size of this save area is 248 bytes. It can be used for issuing CICS commands, such as FREEMAIN, if necessary.
ptoken
A doubleword value containing the Language Environment partition token passed back to CICS at partition initialization.
ttoken (input/output)
A doubleword value containing the Language Environment thread token passed back to CICS at thread initialization.