IBM CICS Asynchronous API: Concurrent Processing Made Simple

Book description

Abstract

This IBM® Redbooks® publication covers the background and implementation of the IBM CICS® asynchronous API, which is a simple, accessible API that is designed to enable CICS application developers to create efficient asynchronous programs in all CICS-supported languages. Using the API, application developers can eliminate the overhead that is involved in coding and managing homegrown asynchronous solutions, instead using a set of CICS-supported API commands to underpin CICS applications, which are more responsive and robust than ever.

Initially, the book reviews the history and motivations of asynchronous processing in computing and the benefits involved when calling external services. It then introduces the asynchronous API itself and its commands. It also provides a range of scenarios, including sample code, that cover everything from the basics of making an asynchronous request to updating existing synchronous program calls, with the goal of illustrating how to harness the CICS asynchronous API to solve real business problems. Later chapters take a deeper dive into the capabilities of the asynchronous API for advanced use cases.

Beyond application development, CICS provides a complete solution for system programmers to manage and monitor asynchronous business logic. Thus, the final chapters of this book cover enhancements to CICS monitoring, statistics, trace, and dumps. Using supporting CICS tooling, system programmers have greater insight than ever, with improved transaction tracking capabilities and CICS policies to provide maximum control and optimization of asynchronous processing in CICS environments.

Table of contents

  1. Front cover
  2. Notices
    1. Trademarks
  3. Preface
    1. Authors
    2. Now you can become a published author, too!
    3. Comments welcome
    4. Stay connected to IBM Redbooks
  4. Chapter 1. Introduction
    1. 1.1 Asynchronous processing, parallelism, and concurrency
    2. 1.2 Why is concurrency desirable?
    3. 1.3 Models of concurrency
      1. 1.3.1 Shared state models
      2. 1.3.2 The actor model, and communicating sequential processes
    4. 1.4 How does asynchronous processing apply to CICS?
    5. 1.5 Comparing asynchronous processing techniques in CICS
    6. 1.6 Summary
  5. Chapter 2. The CICS asynchronous API
    1. 2.1 Basics of the CICS asynchronous API
      1. 2.1.1 Execute work asynchronously
      2. 2.1.2 Track the completion of the asynchronously executing work
      3. 2.1.3 Pass data between parent and child tasks
    2. 2.2 Four CICS asynchronous API commands
      1. 2.2.1 The RUN TRANSID command
      2. 2.2.2 The FETCH CHILD command
      3. 2.2.3 The FETCH ANY command
      4. 2.2.4 The FREE CHILD command
    3. 2.3 Key features and characteristics
      1. 2.3.1 Transactionality
      2. 2.3.2 Orphaned child tasks
      3. 2.3.3 Local children
      4. 2.3.4 Security model
      5. 2.3.5 Passing data with CICS channel and containers
      6. 2.3.6 CICS Asynchronous Services domain
      7. 2.3.7 Timeouts
    4. 2.4 Considerations for using the CICS asynchronous API
      1. 2.4.1 Child GETs and parents UPDATE
      2. 2.4.2 Allow the same parent program to run and fetch child tasks
      3. 2.4.3 Long-running parents should use the FREE CHILD command
      4. 2.4.4 Keep track of fetched channels
      5. 2.4.5 Review MAXTASK and set transaction classes
      6. 2.4.6 Parameterizing timeouts
  6. Chapter 3. Extending applications while minimizing the impact to response time
    1. 3.1 Overview of the scenario
      1. 3.1.1 Description of the sample application
      2. 3.1.2 Objective of the scenario
    2. 3.2 Add a new request using the CICS asynchronous API
      1. 3.2.1 Defining the PTNR transaction to run ACCTPTNR
      2. 3.2.2 Adding logic to print the partner account details
      3. 3.2.3 Adding the RUN TRANSID command to WEBHOME.cbl
      4. 3.2.4 Adding the FETCH CHILD command to the WEBHOME.cbl program
    3. 3.3 Run the updated application
    4. 3.4 Summary
  7. Chapter 4. Improving the response time of existing applications
    1. 4.1 Overview of the scenario
      1. 4.1.1 Description of the sample application
      2. 4.1.2 Objective of the scenario
    2. 4.2 Converting program LINKs to asynchronous API calls
      1. 4.2.1 Define transactions to run the GETNAME and ACCTCURR programs
      2. 4.2.2 Add RUN TRANSID commands to WEBHOME.cbl
      3. 4.2.3 Add the FETCH ANY command to WEBHOME.cbl
    3. 4.3 Running the updated application
    4. 4.4 Summary
  8. Chapter 5. Developing robust applications with unreliable service providers
    1. 5.1 Overview of the scenario
      1. 5.1.1 Objective of the scenario
    2. 5.2 Requesting services from an unreliable service provider
      1. 5.2.1 Why not just use a LINK?
      2. 5.2.2 Asynchronously requesting a new service
      3. 5.2.3 Testing the response times of calling the new service
      4. 5.2.4 Retrieving a timeout value to meet the application’s SLA
      5. 5.2.5 Adding the TIMEOUT parameter to the FETCH command of theunreliable service
    3. 5.3 Running the updated application
    4. 5.4 Summary
  9. Chapter 6. Creating a Java-based controller in a mixed-language environment
    1. 6.1 Making promises about the future
    2. 6.2 CICS asynchronous API classes and methods
      1. 6.2.1 A golden-path scenario
      2. 6.2.2 Additional methods: getAny() and freeChild()
    3. 6.3 Providing a web front end for the web banking application
      1. 6.3.1 Project setup
      2. 6.3.2 Program architecture
      3. 6.3.3 Writing the main program logic
      4. 6.3.4 Displaying the account details and loan rate
    4. 6.4 Summary
  10. Chapter 7. Tips and tricks
    1. 7.1 Trick: Reduce the management burden by running childrenunder a single transaction ID
      1. 7.1.1 The PARENT program running two different children under the ASCH child transaction ID
      2. 7.1.2 Using the ASYNCWP wrapper program to extract the target child program from a channel and linking to it
      3. 7.1.3 The CHILD1 and CHILD2 child programs running under the ASCH transaction
    2. 7.2 Tip: Run existing COMMAREA-based assetsasynchronously without changing them
      1. 7.2.1 The PARENT program running two different children under child transaction ID ASCH passing COMMAREAs to each one
      2. 7.2.2 Using the ASYNCWP wrapper program to extract the PROGRAM target child from channel and linking to it with REQUEST-COMM COMMAREA
      3. 7.2.3 The CHILD1 and CHILD2 child programs running under the ASCH transaction
    3. 7.3 Tip: Release storage wisely in long-running parent transactions
    4. 7.4 Trick: Prevent sets of children from interfering in FETCH ANY logic by using FREE CHILD
    5. 7.5 Tip: Check the status of a child without blocking the parent by using the NOSUSPEND option
    6. 7.6 Trick: Process as many children as possible in a a fixed time period
    7. 7.7 Tip: Using response-only channels between parent and child transactions
  11. Chapter 8. Debugging and problem determination
    1. 8.1 Using the CICS execution diagnostic facility: CEDF and CEDX
    2. 8.2 Asynchronous API abend code
    3. 8.3 Tracing asynchronous API applications
    4. 8.4 Sample application trace flow using FETCH ANY commands
      1. 8.4.1 The environment
      2. 8.4.2 Trace of the PARENT program creating two children
      3. 8.4.3 Trace of one child
      4. 8.4.4 Trace of the PARENT program fetch the response from any child
    5. 8.5 Sample application trace flow using FETCH CHILD commands and the NOSUSPEND and TIMEOUT options
      1. 8.5.1 The environment
      2. 8.5.2 Trace of FETCH CHILD NO SUSPEND
      3. 8.5.3 Trace of FETCH CHILD TIMEOUT
      4. 8.5.4 Trace of FETCH CHILD
    6. 8.6 Sample application trace flow using FREE CHILD commands
      1. 8.6.1 The environment
      2. 8.6.2 Trace of free child tasks
    7. 8.7 Transaction dumps and the asynchronous API
      1. 8.7.1 Asynchronous parent task transaction dump extract
      2. 8.7.2 Asynchronous child task transaction dump extract
    8. 8.8 System dumps and the asynchronous API
      1. 8.8.1 Asynchronous parent system dump extract
  12. Chapter 9. Performance and management for asynchronous API applications
    1. 9.1 Special aspects for asynchronous API applications
    2. 9.2 Managing the number of tasks in the system
      1. 9.2.1 Using MXT
      2. 9.2.2 Using TRANCLASS to manage parent transactions
      3. 9.2.3 Using TRANCLASS to manage child transactions
    3. 9.3 Duration of parent tasks in the system
      1. 9.3.1 Parent tasks waiting upon child tasks
      2. 9.3.2 MAXTASK condition causing parent tasks to suspend
    4. 9.4 Policing parent tasks with CICS policy
    5. 9.5 Threadsafe considerations
    6. 9.6 Asynchronous services statistics
    7. 9.7 Asynchronous services monitoring
  13. Chapter 10. System tracking of asynchronous applications
    1. 10.1 Data gathered by transaction tracking
      1. 10.1.1 Origin data
      2. 10.1.2 Previous transaction data
      3. 10.1.3 Previous hop data
      4. 10.1.4 Task context data
      5. 10.1.5 Application context data
      6. 10.1.6 Flow of tracking data
    2. 10.2 Using the INQUIRE ASSOCIATION command to track tasks
      1. 10.2.1 Building the picture of the application flow using the tracking data
    3. 10.3 Using CICS Explorer to track tasks
      1. 10.3.1 Tracking interrelated tasks using search
      2. 10.3.2 Finding out associated tasks using the Task Associations views
      3. 10.3.3 Graphical view of associated tasks
      4. 10.3.4 Graphical view of orphaned tasks
    4. 10.4 Using CICS Performance Analyzer to understand task relationship
      1. 10.4.1 Brief overview of CICS Performance Analyzer
      2. 10.4.2 Extending the business application
      3. 10.4.3 Transaction tracking reports by CICS Performance Analyzer
      4. 10.4.4 Transaction group reports by CICS Performance Analyzer
    5. 10.5 Using IBM OMEGAMON for CICS on z/OS V5.5.0 to monitor performance
      1. 10.5.1 Alerts showing up in OMEGAMON
      2. 10.5.2 Drill down to the problematic task
  14. Back cover

Product information

  • Title: IBM CICS Asynchronous API: Concurrent Processing Made Simple
  • Author(s): Pradeep Gohil, Julian Horn, Jenny He, Anthony Papageorgiou, Chris Poole
  • Release date: December 2017
  • Publisher(s): IBM Redbooks
  • ISBN: 9780738442921