You are previewing Threadsafe Considerations for CICS.
O'Reilly logo
Threadsafe Considerations for CICS

Book Description

Beginning with IBM® CICS® Version 2, applications can run on TCBs apart from the QR TCB, which has positive implications for improving system throughput and for implementing new technologies inside of CICS. Examples of implementing new technologies include using the IBM MVS™ Java virtual machine (JVM) inside CICS and enabling listener tasks written for other platforms to be imported to run under CICS.

The newest release, CICS Transaction Server for z/OS® (CICS TS) V4.2, includes scalability enhancements so that you can perform more work more quickly in a single CICS system. The advantage of this enhancement is that you can increase vertical scaling and decrease the need to scale horizontally, reducing the number of regions that are required to run the production business applications. The scalability enhancements in CICS TS V4.2 fall into two broad areas, which are increased usage of open transaction environment (OTE) and of 64-bit storage.

This IBM Redbooks® publication is a comprehensive guide to threadsafe concepts and implementation for IBM CICS. This book explains how systems programmers, applications developers, and architects can implement threadsafe applications in an environment. It describes the real-world experiences of users, and our own experiences, of migrating applications to be threadsafe. This book also highlights the two most critical aspects of threadsafe applications: system performance and integrity.

Table of Contents

  1. Front cover
  2. Notices
    1. Trademarks
  3. Preface
    1. The team who wrote this book
    2. Now you can become a published author, too!
    3. Comments welcome
    4. Stay connected to IBM Redbooks
  4. Summary of changes
    1. April 2012, Fifth Edition
    2. November 2010, Fourth Edition
    3. November 2007, Third Edition
    4. July 2006, Second Edition
  5. Part 1 Threadsafe concepts and definitions
  6. Chapter 1. Introduction to CICS open transaction environment
    1. 1.1 The concept of the CICS open transaction environment
      1. 1.1.1 Improved throughput
      2. 1.1.2 Improved performance
    2. 1.2 CICS data integrity for shared resources
      1. 1.2.1 Quasi-reentrant and threadsafe programs
      2. 1.2.2 Shared application resources
      3. 1.2.3 Shared CICS resources
      4. 1.2.4 Threadsafe applications
    3. 1.3 Benefits of threadsafe-enabled applications
      1. 1.3.1 Improving performance
      2. 1.3.2 Reducing the cost of computing
      3. 1.3.3 Using OTE
      4. 1.3.4 The importance of understanding your applications
  7. Chapter 2. Overview of an open transaction environment and threadsafe applications
    1. 2.1 Overview of quasi-reentrant and threadsafe programs
      1. 2.1.1 Quasi-reentrant programs
      2. 2.1.2 Threadsafe programs
      3. 2.1.3 CICSAPI programs
      4. 2.1.4 OPENAPI programs
    2. 2.2 Open transaction environment: A brief history
      1. 2.2.1 Before CICS Transaction Server V1.3
      2. 2.2.2 CICS Transaction Server V1.3
      3. 2.2.3 CICS Transaction Server V2.2
      4. 2.2.4 CICS Transaction Server V2.3
      5. 2.2.5 CICS Transaction Server V3.1
      6. 2.2.6 CICS Transaction Server V3.2
      7. 2.2.7 CICS Transaction Server V4.2
      8. 2.2.8 Open TCB modes in CICS Transaction Server V2
      9. 2.2.9 Open TCB modes in CICS Transaction Server V3 and later
    3. 2.3 Techniques to ensure threadsafe processing
    4. 2.4 Program definition
    5. 2.5 Task-related user exit APIs
      1. 2.5.1 CICS DB2 task-related user exit
      2. 2.5.2 CICS IMS task-related user exit
      3. 2.5.3 CICS WebSphere MQ task-related user exit
      4. 2.5.4 IP sockets task-related user exit
    6. 2.6 TCB limits
      1. 2.6.1 MAXOPENTCBS
    7. 2.7 Open TCB performance
      1. 2.7.1 DB2
      2. 2.7.2 IMS
      3. 2.7.3 WebSphere MQ
      4. 2.7.4 IP CICS Sockets interface
      5. 2.7.5 Performance considerations
    8. 2.8 TCB considerations with UNIX System Services
      1. 2.8.1 Implications of setting MAXPROCUSER too low
    9. 2.9 Static and dynamic calls
    10. 2.10 Threadsafe and nonthreadsafe commands in CICS Transaction Server
      1. 2.10.1 Threadsafe API commands
      2. 2.10.2 Threadsafe SPI commands
      3. 2.10.3 Threadsafe XPI commands
      4. 2.10.4 Nonthreadsafe SPI commands
    11. 2.11 Function shipping considerations
      1. 2.11.1 Before CICS Transaction Server V4.2
      2. 2.11.2 CICS Transaction Server V4.2 and later
  8. Chapter 3. Threadsafe techniques
    1. 3.1 Threadsafe standards
    2. 3.2 Serialization techniques
      1. 3.2.1 Recommended serialization techniques
      2. 3.2.2 Generalized compare and swap routine
      3. 3.2.3 Nonrecommended techniques
    3. 3.3 Application design considerations
      1. 3.3.1 Application design considerations for CICS TS V3.2
      2. 3.3.2 Application design considerations for CICS TS V4.2
  9. Part 2 Threadsafe implementation
  10. Chapter 4. Threadsafe tasks
    1. 4.1 Threadsafe enablement planning
      1. 4.1.1 CICS Transaction Server upgrade and enablement path
      2. 4.1.2 High-level threadsafe enablement path
    2. 4.2 Load module scanner: The DFHEISUP utility
      1. 4.2.1 DFHEISUP filter tables
      2. 4.2.2 DFHEISUP summary mode
      3. 4.2.3 DFHEISUP detail mode
      4. 4.2.4 DFHEISUP summary
  11. Chapter 5. Application review
    1. 5.1 Reviewing the application code
      1. 5.1.1 Ensuring that the program logic is threadsafe
      2. 5.1.2 Example showing the use of shared resources
      3. 5.1.3 Assembler data tables
      4. 5.1.4 Ensuring usage of only threadsafe CICS commands
    2. 5.2 Changing the program definitions
      1. 5.2.1 Changing the RDO definition
      2. 5.2.2 CICS environment variable CICSVAR
      3. 5.2.3 CICSVAR values
      4. 5.2.4 Coding ENVAR
      5. 5.2.5 Example of file control application
  12. Chapter 6. System programmer tasks
    1. 6.1 Role of the system programmer
    2. 6.2 Understanding threadsafe operation
      1. 6.2.1 Threadsafe performance issues
      2. 6.2.2 Threadsafe data integrity issues
    3. 6.3 Analyzing the CICS regions
      1. 6.3.1 DB2 version
      2. 6.3.2 WebSphere MQ version
      3. 6.3.3 IMS version
      4. 6.3.4 DB2 system parameters
      5. 6.3.5 WebSphere MQ system parameters
      6. 6.3.6 IMS DBCTL system parameters
      7. 6.3.7 CICS system parameters
    4. 6.4 Providing a threadsafe CICS operating environment
      1. 6.4.1 CICS exits
      2. 6.4.2 Analyzing your exits
      3. 6.4.3 Running the DFH0STAT utility
      4. 6.4.4 Exits that must be reviewed
      5. 6.4.5 Identifying exits in the DB2, WMQ, and file control call paths
      6. 6.4.6 Identifying dynamic plan exits in the DB2 call path
      7. 6.4.7 Contacting the owner of vendor product exits
    5. 6.5 Making your exits threadsafe
      1. 6.5.1 Removing nonthreadsafe commands
      2. 6.5.2 Serializing shared resources
      3. 6.5.3 Changing the CONCURRENCY definition of the exit program to THREADSAFE
    6. 6.6 Nonthreadsafe data integrity example
      1. 6.6.1 Nonthreadsafe code example
      2. 6.6.2 Threadsafe code example
      3. 6.6.3 Code changes to make RMIXIT threadsafe
    7. 6.7 Coordinating and driving individual application conversions
      1. 6.7.1 Changing your program definitions
    8. 6.8 Post-conversion monitoring
    9. 6.9 Summary
  13. Chapter 7. Threadsafe conversion considerations
    1. 7.1 Global user exit considerations
      1. 7.1.1 A potential pitfall
      2. 7.1.2 The solution
    2. 7.2 Migrating WebSphere MQ regions
      1. 7.2.1 The API crossing exit (CSQCAPX)
    3. 7.3 Threadsafe program definition considerations
      1. 7.3.1 OPENAPI programs and additional TCB switching
    4. 7.4 Function shipped commands
    5. 7.5 COBOL calls
      1. 7.5.1 PROGA (Quasirent) calling PROGB (threadsafe)
      2. 7.5.2 PROGA (threadsafe) calling PROGB (Quasirent)
    6. 7.6 The CSACDTA field
    7. 7.7 Ensuring CICS performance and capacity
      1. 7.7.1 Analyzing the current settings
      2. 7.7.2 Ensuring the availability of sufficient CPU capacity for threadsafe regions
      3. 7.7.3 Analyzing the DB2 attachment facility
    8. 7.8 Diagnosing performance problems
      1. 7.8.1 Defining the problem
      2. 7.8.2 Performance hierarchy
      3. 7.8.3 Key performance indicators
      4. 7.8.4 Performance data sources
      5. 7.8.5 RMF Workload Activity reports
      6. 7.8.6 CICS PA reports
      7. 7.8.7 The DFH0STAT utility
      8. 7.8.8 Review
  14. Chapter 8. Migration scenario
    1. 8.1 Description of the sample application
    2. 8.2 Migration plan
    3. 8.3 Migration part 1
      1. 8.3.1 Identifying the in-scope exits for part 1
      2. 8.3.2 Converting the in-scope exits to threadsafe programs
      3. 8.3.3 Addressing nonthreadsafe commands
      4. 8.3.4 Confirming performance after migration to CICS Transaction Server V2.3
    4. 8.4 Migration part 2
      1. 8.4.1 Identifying programs in scope for part 2
      2. 8.4.2 Converting user exits to be threadsafe
      3. 8.4.3 Converting application programs to be threadsafe
      4. 8.4.4 Addressing nonthreadsafe commands
      5. 8.4.5 Making changes to the CICS Transaction Server region
    5. 8.5 Performance measurement
      1. 8.5.1 Reports
      2. 8.5.2 Charts
      3. 8.5.3 Conclusions
    6. 8.6 Additional considerations for OPENAPI programs
  15. Chapter 9. Threadsafe enablement using CICS Tools
    1. 9.1 Four-step CICS Tools process
      1. 9.1.1 Identifying candidates and capturing baseline by using CICS Performance Analyzer
      2. 9.1.2 Analyzing program behavior by using CICS IA
      3. 9.1.3 Changing CICS resource definitions by using CICS CM
      4. 9.1.4 Testing and benchmarking the results by using CICS PA and CICS IA
    2. 9.2 Application case study using the CICS Tools process
    3. 9.3 Identifying candidates and capturing a baseline
      1. 9.3.1 Collecting SMF data for the applications
      2. 9.3.2 Running the CICS PA reports
      3. 9.3.3 Output from the CICS PA reports
      4. 9.3.4 Loading the data into a historical database and DB2
    4. 9.4 Analyzing the program behavior
      1. 9.4.1 Collecting interdependency data
      2. 9.4.2 Loading CICS IA dependency data
      3. 9.4.3 Analyzing interdependency data
      4. 9.4.4 Analyzing the MAIL transaction
      5. 9.4.5 Running the CICS IA Command Flow feature
      6. 9.4.6 Analyzing the CICS IA command flow data
      7. 9.4.7 The Dynamic Threadsafe Analysis report
      8. 9.4.8 Analyzing the TXM* transaction
    5. 9.5 Changing the program definitions
      1. 9.5.1 Viewing the program definition
      2. 9.5.2 Changing the program definition
      3. 9.5.3 Viewing Audit history
      4. 9.5.4 Comparing the resource definitions
      5. 9.5.5 Installing the program definition
    6. 9.6 Testing and benchmarking the results
      1. 9.6.1 Running the PA Transaction Profiling report
      2. 9.6.2 Rerunning the PA threadsafe reports
      3. 9.6.3 Analyzing the PA reports
  16. Part 3 Performance and general questions
  17. Chapter 10. Performance case studies
    1. 10.1 CICS DB2 and file control application
      1. 10.1.1 Environment
      2. 10.1.2 Results
    2. 10.2 CICS WMQ and file control application
      1. 10.2.1 Environment
      2. 10.2.2 Results
  18. Chapter 11. Common threadsafe questions
    1. 11.1 CICS exits
    2. 11.2 Defining applications as threadsafe
    3. 11.3 Fields and parameters
    4. 11.4 Load module scanner
    5. 11.5 Nonthreadsafe CICS commands
    6. 11.6 Performance
    7. 11.7 TCB switching
    8. 11.8 Threadsafe file control
    9. 11.9 Using L8 or L9 TCBs
  19. Part 4 Appendixes and related publications
  20. Appendix A. Overview of CICS Tools
    1. CICS Performance Analyzer for z/OS
    2. CICS Interdependency Analyzer for z/OS
    3. CICS Configuration Manager
    4. CICS VSAM Transparency performance on CICS Transaction Server V3.2, V4.1, and V4.2
  21. Appendix B. Maintenance of CICS, DB2, and WebSphere MQ
    1. APARs for CICS Transaction Server V3.1
    2. APARs for CICS Transaction Server V3.2
    3. APARs for CICS Transaction Server V4.1 and V4.2
    4. APARs for WebSphere MQ 6.1
    5. APARs for the DFHEISUP utility
  22. Appendix C. Assembler routines
    1. DB2MANY
    2. DB2PROG1
    3. DB2PROG4
    4. DB2PROG8
    5. PLANEXIT
    6. EXITENBL
    7. XXXEI exit
    8. XXXRMI exit
    9. XXXTS exit
  23. Related publications
    1. IBM Redbooks
    2. Other publications
    3. Online resources
    4. Help from IBM
  24. Back cover