Making applications threadsafe
When you make an application program threadsafe, you can use the open transaction environment, avoid TCB switching, and gain performance benefits.
Before you begin
To use threadsafe application programs, ensure that the system initialization parameter FORCEQR is not set to YES. FORCEQR forces programs defined as threadsafe to run on the QR TCB, and it might be set to YES as a temporary measure while problems connected with threadsafe-defined programs are investigated and resolved.
- If you use IPIC connections to function ship file control requests to remote CICS® TS 4.2 or later regions, to improve performance for those connections set FCQRONLY to NO in the file-owning regions.
- If you use only MRO links or ISC over SNA connections, or your file-owning regions are earlier than CICS TS 4.2, set FCQRONLY to YES in the file-owning regions.
If you are using CICS intercommunication to make requests for functions or programs to run in remote CICS systems, choose IP interconnectivity (IPIC) over TCP/IP connections between the CICS systems to provide optimal support for threadsafe applications. With IPIC connections, CICS uses an open TCB to run the mirror program that manages the request on the remote CICS system, providing improved throughput. With other connection types, CICS does not use an open TCB to run the mirror program. The EXEC CICS LINK command, used for distributed program link (DPL), is threadsafe for IPIC connections to remote CICS regions where a long-running mirror is used, but not for other connection types.
About this task
Threadsafe programs explains what it means for a program to be threadsafe, and the circumstances when TCB switching takes place between open TCBs and the QR TCB.
To make an application program threadsafe and enable it to remain on an open TCB, use the following procedure.