The CONCURRENCY(REQUIRED) option lets the user define that the program must start on an open TCB, independently of defining what APIs it uses.
If the program uses only CICS-supported APIs (including access to external resource managers such as DB2, IMS, and WebSphere MQ), it should be defined with program attribute API(CICSAPI). In this case, CICS always uses an L8 open TCB, regardless of the program execution key because CICS commands don’t rely on the TCB key.
If the program uses other non-CICS APIs, it must be defined with program attribute API(OPENAPI). In this case, CICS uses an L9 TCB or an L8 TCB, depending on the program execution key. This allows non-CICS APIs to operate correctly. This OPENAPI behavior is the same as in previous releases.
Existing threadsafe applications, which have taken advantage of the performance gains of being able to run on the same TCB as the call to an external resource manager, may be able to gain further throughput advantages by being defined as CONCURRENCY(REQUIRED) API(CICSAPI). Throughput gains accrue when an application can run for longer periods of time on an open TCB.
However, not all applications are suitable. For example, a threadsafe application that issues many EXEC SQL requests and then issues many EXEC CICS commands that aren’t threadsafe is best left as CONCURRENCY(THREADSAFE). Defining the application as CONCURRENCY(REQUIRED) would mean two TCB switches for each non-threadsafe CICS command because control always returns to the application on the open TCB (see Figure 2).
This situation demonstrates the importance of knowing what the application does. To help you find out, tools such as CICS Interdependency Analyzer for z/OS (CICS IA) enable you to discover application execution paths. In particular, its command flow feature shows the order in which CICS, IMS, WebSphere MQ and DB2 commands run, and what TCB each command ran on. Other tools, such as CICS Performance Analyzer for z/OS (CICS PA), analyze CICS performance System Management Facility (SMF) data and show, for example, how much CPU has been consumed on which TCBs and how many TCB switches have occurred. Tools such as CICS IA and CICS PA are invaluable aids to have in your toolbox when embarking on a threadsafe project (see Figure 3).
The CICS-supplied mirror program, DFHMIRS, used by all mirror transactions, is now defined as threadsafe. In addition, the IPIC transformers are threadsafe. For IPIC connections only, CICS runs the mirror program on an L8 open TCB when possible. For threadsafe applications that function ship commands to other CICS regions using IPIC, the resulting reduction in TCB switching improves application performance compared to other intercommunication methods. To gain the performance improvement for remote files, you must specify the system initialization parameter FCQRONLY=NO in the File Owning Region (FOR).