Cover image for Designing and Programming CICS Applications

Book description

Designing and Programming CICS Applications targets a diverse audience. It introduces new users of IBM's mainframe (OS/390) to CICS features. It shows experienced users how to integrate existing mainframe systems with newer technologies, including the Web, CORBA, Java, CICS clients, and Visual Basic; as well as how to link MQSeries and CICS. Users learn not only how to design and write their programs, but also how to deploy their applications.

Table of Contents

  1. Designing and Programming CICS Applications
    1. SPECIAL OFFER: Upgrade this ebook with O’Reilly
    2. A Note Regarding Supplemental Files
    3. Preface
      1. The Book’s Audience
      2. Organization of the Book
      3. About the CD-ROM
      4. Conventions in This Book
      5. How to Contact Us
      6. Acknowledgments
    4. I. Introduction to CICS
      1. 1. Introduction
        1. The Essentials of a Business Application
          1. Division of Responsibilities
          2. Lifecycle Requirements
          3. Technical Requirements
        2. Business Applications as Creators of Value
        3. Using CICS for Business Applications
          1. Examples of Business Applications That Use CICS
      2. 2. Designing Business Applications
        1. The Heart of a Business Application
          1. Components
            1. Business logic components
            2. Presentation logic components
            3. Component interfaces
            4. A note about traditional CICS applications
          2. Transactions
            1. Limitations of ACID transactions
          3. Error Handling
            1. The need for a methodical approach
        2. How CICS Can Help the Application Designer
          1. CICS Transactions
          2. CICS Programs and Linking
            1. Synchronous calling between programs
            2. Asynchronous calling between programs
            3. Calling CICS programs from non-CICS programs
            4. Defining resources
          3. Working with MQSeries
          4. Error Handling Facilities
          5. Security
            1. Transaction security
            2. Resource security and command security
          6. Other Services for the Application Designer
        3. Developing the Components of a Business Application
          1. Design
          2. Programming
          3. Test and Debug
          4. Deployment
        4. What’s Next…
      3. 3. Introducing the Sample Application
        1. The Business Case
          1. The IT Requirements
          2. The Cross-Functional Team
        2. The Design of the Sample Application
          1. The Initial Architecture
        3. What’s Next…
    5. II. The COBOL Business Logic Component
      1. 4. Designing the Business Logic
        1. Understanding What COBOL Components Need to Do
          1. Looking at the Data Structure
          2. Assessing Restrictions
          3. Estimating the Workload
          4. Summary
        2. Incorporating CICS Design Guidelines
          1. Using Resources Efficiently
            1. Shared resources
            2. Single-user resources
          2. Maintaining File Integrity: Using Locking
          3. Handling Errors
            1. Categories of errors in a CICS transaction
        3. Handling Data
          1. The Account File
          2. The Name File
          3. The Locking File
          4. Recovery Requirements
        4. Designing the Individual Functions
          1. Creating, Reading, Updating, and Deleting Account Records
            1. Reading a record
          2. Browsing Records
          3. Error Processing
        5. Mapping the Functions to CICS Programs
        6. Looking at the Business Logic Programs
          1. The Create, Read, Update, and Delete Backend Progam (NACT02)
          2. The ABEND/Error Handler Program (NACT04)
          3. The Name Browse Backend Program (NACT05)
        7. Summary
      2. 5. Programming the COBOL Business Logic
        1. Writing CICS Programs in COBOL
          1. Invoking CICS Services
          2. Differences from Standard COBOL Programs
        2. Handling Files
          1. READ Commands
          2. Using the READ Command in the Sample Application
          3. Browsing a File
            1. Starting the browse operation
            2. Reading the next record
            3. Finishing the browse operation
            4. Using the browse commands in the sample application
          4. Write Commands
            1. Rewriting a file record
            2. Adding (writing) a file record
            3. Deleting a file record
            4. Using the write commands in the example application
            5. Errors on file commands
          5. Other File Services
        3. Saving Data: Using a Scratchpad Facility
          1. Affinities
        4. Controlling Programs
          1. Associating Programs and Transactions
          2. Commands for Passing Program Control
          3. The LINK Command
          4. The XCTL Command
          5. The RETURN Command
          6. The COBOL CALL Statement
          7. Subroutines
          8. Examples of Passing Control and Data Between Programs and Transactions
          9. Communicating Between Transactions in the Sample Application
            1. Accessing the COMMAREA in the called program
            2. Examples of EXEC CICS RETURN use
          10. Errors on the Program Control Commands
        5. Abending a Transaction
          1. Other Program Control Commands
        6. Queuing Facilities: Temporary Storage and Transient Data
          1. Temporary Storage
          2. Transient Data
          3. The EXEC CICS WRITEQ TD Command
            1. The EXEC CICS WRITEQ TD command as used in the NACT04 program
        7. Handling Errors
          1. The EXEC CICS ASSIGN Command
            1. The EXEC CICS ASSIGN command as used in the NACT04 program
          2. The EXEC CICS INQUIRE PROGRAM Command
            1. Description
            2. Browsing
            3. The EXEC CICS INQUIRE PROGRAM as used in the NACT04 program
          3. The EXEC CICS DUMP TRANSACTION Command
            1. EXEC CICS DUMP TRANSACTION as used in NACT04
          4. The EXEC CICS SYNCPOINT ROLLBACK Command
            1. The EXEC CICS SYNCPOINT ROLLBACK command as used in the NACT04 program
          5. The EXEC CICS WRITE OPERATOR Command
            1. The EXEC CICS WRITE OPERATOR command as used in the NACT04 program
          6. Other Commands
        8. What’s Next…
    6. III. The CICS Java Component
      1. 6. Designing the CICS Java Component
        1. Background to Java and CORBA in a CICS Environment
          1. Java in a CICS Environment
          2. Introduction to CORBA
          3. CICS IIOP Support
        2. Understanding What This Component Needs to Do
        3. Describing a Customer Account Object with IDL
        4. Design of the CICS Java Component
        5. Implementing CICS Java Components
        6. What’s Next…
      2. 7. Programming the CICS Java Component
        1. Tools
        2. Setting Up Your Development Environment
        3. Creating and Compiling the IDL Definition
        4. Writing the Server Implementation Class
          1. Examining the Methods in the _accountInterfaceImpl Class
        5. Exporting and Binding the Server Application to the CICS Region
        6. Creating the CORBA Client
          1. Creating the Client Program
          2. Create genfac.ior File
          3. Creating the RunClient Class
          4. Testing the Client
        7. What’s Next…
    7. IV. The Web Component
      1. 8. Designing the Web Component
        1. Understanding What the Component Needs To Do
        2. Designing the Web Interface
        3. Designing the Web Server Components
          1. The Java Servlet
          2. The JavaBean
          3. The Java Server Pages (JSP files)
          4. Why Design It This Way?
        4. Designing the CORBA Client Implementation
        5. What’s Next…
      2. 9. Programming the Web Component
        1. Tools
          1. Install and Configure a Web Server
          2. Using WebSphere Studio
          3. Servlet Configuration
        2. Building the Web Site
        3. Programming the Web Server Components
          1. Creating a WebSphere Studio Project
          2. Creating AccountBean
            1. Looking at the coding in AccountBean
          3. Creating KanDoItServlet
          4. Creating the Java Server Page File
            1. Examining the details of the Java Server Page
          5. Creating the Error JSP File
          6. Incorporating the CORBA Client
          7. Modifying KanDoItServlet.java
          8. Modifying ClientStub.java
          9. Publishing Your Files
          10. Testing the Sample
        4. What’s Next…
    8. V. The 3270 Interface
      1. 10. Designing the Presentation Logic
        1. Understanding What the Presentation Logic Component Needs to Do
          1. IBM 3270 Information Display System
          2. 3270 Field Structure
          3. Planning Your 3270 Screen Layout: Using a Menu Screen
        2. Interface Design Principles
        3. Incorporating CICS Design Guidelines
          1. Conversational or Pseudo-conversational Transactions?
            1. Conversational transactions
            2. Pseudo-conversational transactions
          2. Handling Errors
        4. Designing the Functions
      2. 11. Programming the 3270 Presentation Logic Component
        1. Defining Screens with Basic Mapping Support (BMS)
          1. What Is BMS and What Does It Do?
          2. Defining a Menu Map Using BMS Macros
            1. The DFHMDF macro: generate a map definition for a field
            2. The DFHMDI macro: generate BMS map definition
            3. The DFHMSD macro: generate BMS map set definition
            4. Rules on macro formats
          3. Map Definitions for the Sample Application
            1. Defining the account detail map
            2. Notes on the Account Detail map
            3. Defining the error map
          4. The Mapset
        2. Symbolic Description Maps
          1. Copying the Map Structure into a Program
          2. Notes on DSECTs
        3. Sending a Map to a Terminal
          1. The SEND MAP Command
            1. Using SEND MAP in the sample application
          2. Positioning the Cursor
          3. Sending Control Information Without Data
          4. Receiving Input from a Terminal
            1. The RECEIVE MAP command
          5. Finding Out What Key the Operator Pressed
            1. The EXEC Interface Block (EIB)
            2. AID byte definitions
          6. Errors on BMS Commands
            1. MAPFAIL errors
          7. Starting Another Task, and Other Time Services
          8. Starting Another Task
            1. Retrieving data passed to the START command
            2. Using the START and RETRIEVE commands in the sample application
            3. Errors on the START and RETRIEVE commands
        4. Local Printing (NACT03): Requests for Printing
        5. What’s Next…
    9. VI. The Visual Basic Component
      1. 12. Designing the Visual Basic Component
        1. Understanding What the Component Needs to Do
        2. Designing the Graphical User Interface
          1. Designing the Log In panel
          2. Designing the Main Menu
        3. Designing the Print Function
        4. Designing the Online Help
        5. Designing the Data Validation
        6. Designing Access to and Control of the CICS Application
          1. Understanding the CICS External Call Interface (ECI)
            1. Using the ECI
            2. Initiating the CICS client
          2. Data Conversion Between the CICS Universal Client and CICS Transaction Server
          3. Accessing Applications on the CICS Server with Standard CICS Object-Oriented Support
            1. Using the CICS Client Component Object Module (COM) libraries
          4. Accessing Applications on the CICS Server Using the VisualAge Interspace API
            1. Creating the link to the CICS ECI
            2. Communicating with the CICS application
        7. Designing Error Handling
      2. 13. Programming the Visual Basic Program
        1. Writing the Graphical User Interface
        2. Implementing the Print Function
        3. Implementing the Online Help
        4. Implementing the Data Validation Code
        5. Accessing Applications on the CICS Server
          1. Handling Data
          2. Writing the ECI Component
            1. Making an ECI link call to CICS
            2. Handling ECI errors
          3. Accessing Applications on the CICS Server with the VisualAge Interspace API
          4. Creating the VisualAge Interspace Service for the NACT02 CICS Server Application
            1. Testing the VisualAge Interspace Service
            2. Generating the Visual Basic module for the service
            3. Incorporating the generated service module into the Visual Basic project
            4. Coding the required VisualAge Interspace API calls
        6. Communicating with CICS
          1. A Digression About TCP62
          2. Configuring the Application
          3. Configuring CICS Transaction Server for OS/390 for TCP62
          4. Configuring VTAM for OS/390
          5. Handling Data Conversion
          6. Configuring the Windows NT HOSTS File on the Client
          7. Configuring the CICS Universal Client
          8. Testing the TCP62 Connection
          9. Running the ACCT Application
        7. What’s Next….
    10. VII. CICS and MQSeries
      1. 14. Designing an Application to Use the MQSeries-CICS Bridge
        1. Background to MQSeries
          1. Queue Managers
          2. How Applications Identify Themselves to Queue Managers
          3. Opening a Queue
          4. Putting and Getting Messages
          5. Messaging Using More Than One Queue Manager
        2. The MQSeries-CICS Bridge
          1. When To Use the MQSeries-CICS Bridge
        3. Designing the Graphical User Interface
        4. Designing the Java Application
        5. Configuring MQSeries
        6. Running CICS DPL Programs
        7. Why Design It This Way?
        8. What’s Next…
      2. 15. Programming the MQSeries-CICS Bridge
        1. Building the Java GUI
        2. Coding the Java Application
          1. Coding the Java Application
          2. Opening the Relevant MQSeries Queues
          3. Creating the MQSeries Message
          4. Adding the CICS Program Name and COMMAREA Fields to the Message Buffer
          5. Sending the Request Message to the Bridge Queue on MQSeries for OS/390
          6. Receiving the Response Message.
          7. Checking for CICS-Related Errors
          8. Displaying the Relevant Information
        3. Setting Up MQSeries and CICS
          1. Define MQSeries for Windows NT
          2. Starting MQSeries for Windows NT
          3. Setting Up MQSeries for OS/390
          4. Setting Up CICS To Use the MQSeries-CICS Bridge
          5. Defining MQSeries for OS/390 Objects
          6. Starting Your Channel
          7. Connecting to MQSeries from Your CICS Region
          8. Starting the CICS Bridge
          9. Starting the Listener on OS/390
          10. Running the Application for the Workstation
          11. Troubleshooting
        4. What’s Next…
    11. VIII. Debugging
      1. 16. Debugging in CICS
        1. CICS-Supplied Transactions
        2. EDF: Execution Diagnostic Facility
          1. Interception Points
          2. EDF Displays
          3. Other Information Displayed
          4. Useful Techniques with EDF
          5. EDF Options
          6. Getting Started
          7. Examples of EDF Displays
          8. Program Initiation with EIB
          9. About to Execute Command
          10. Command Execution Complete
          11. Command Sequence for the Browse
          12. Working Storage
          13. Task Termination
        3. Summary
    12. IX. Appendices
      1. A. Configuring Your CICS for OS/390 Environment
        1. Getting Ready
        2. Using the CD-ROM
          1. Getting the Data from the CD-ROM
          2. Uploading the Files
            1. Receiving the data sets
        3. Configuring the COBOL Component
          1. Setting up the VSAM File
          2. Setting Up and Installing the CICS Resource Definitions
          3. Running the Application
        4. Configuring the CICS Java Component
          1. Defining Your CICS Resources
          2. Setting Up CICS Java on OS/390
        5. Using the PDF Files for the CICS Main Library
      2. B. List of CD-ROM Files
        1. Files Used by the COBOL Application
    13. Glossary
    14. C. Suggestions for Further Reading
    15. Index
    16. About the Authors
    17. Colophon
    18. SPECIAL OFFER: Upgrade this ebook with O’Reilly