Compaq ACMS for OpenVMS
Writing Server Procedures


Begin Index

Contents (summary)
Preface Preface
Part 1 User Information
Chapter 1 Introduction to Server Procedures
Chapter 2 Writing Initialization, Termination, and Cancel Procedures
Chapter 3 Writing Step Procedures
Chapter 4 Accessing Resource Managers
Chapter 5 Using Message Files with ACMS Tasks and Procedures
Chapter 6 Building Procedure Server Images
Chapter 7 Debugging Tasks and Procedures
Chapter 8 Debugging an Application in an ACMS Run-Time Environment
Part 2 Reference Material
Chapter 9 ACMS Programming Services
Chapter 10 ACMS Task Debugger Commands
Part 3 Interoperability with Third-Party Databases: Oracle Case Study
Chapter 11 Overview of ACMS and Oracle
Chapter 12 Implementation Details of the Sample Application
Part 4 Interoperability with IBM LU6.2 and CICS
Chapter 13 Overview of ACMS and APPC/LU6.2
Chapter 14 Implementation Details of the Sample Application
Part 5 Appendixes
Appendix A Summary of ACMS System Workspaces
Appendix B Libraries Included in AVERTZ Sample Procedures
Appendix C Superseded Features
  Index
  Figures
  Examples
  Tables


Contents


Preface
Preface Preface
Part 1
Part 1 User Information
Chapter 1
1 Introduction to Server Procedures
     1.1     Procedure Server Terminology
     1.2     Understanding Server Procedures
         1.2.1         Initialization, Termination, and Cancel Procedures
         1.2.2         Step Procedures
     1.3     Naming and Structuring a Server Procedure
     1.4     Programming Services and Tools
Chapter 2
2 Writing Initialization, Termination, and Cancel Procedures
     2.1     Writing Initialization Procedures
         2.1.1         Guidelines for Writing Initialization Procedures
         2.1.2         Binding or Attaching to Databases
         2.1.3         Initialization Procedures for Rdb Databases Using SQL
             2.1.3.1             Specifying the Access Mode and Relations Used by the Server
             2.1.3.2             Using COBOL
         2.1.4         Initialization Procedures for Rdb Databases Using RDO
         2.1.5         Initialization Procedures for DBMS Databases
             2.1.5.1             Using COBOL
             2.1.5.2             Using BASIC
         2.1.6         Initialization Procedures for RMS Files
             2.1.6.1             Using COBOL
             2.1.6.2             Using BASIC
     2.2     Writing Termination Procedures
         2.2.1         Termination Procedures for Rdb Databases Using SQL
         2.2.2         Termination Procedures for Rdb Databases Using RDO
         2.2.3         Termination Procedures for DBMS Databases
         2.2.4         Termination Procedures for RMS Files
             2.2.4.1             Using COBOL
             2.2.4.2             Using BASIC
     2.3     Server Process Rundown
     2.4     Using Cancel Procedures
         2.4.1         Guidelines for Avoiding Cancel Procedures
         2.4.2         Situations in Which Using Cancel Procedures Is Unavoidable
         2.4.3         Using $SETAST to Prevent Procedure Server Interruption
         2.4.4         Conditions Under Which Cancel Procedures Are Called
         2.4.5         Cancel Procedures in Distributed and Nondistributed Transactions
         2.4.6         Writing a Cancel Procedure
             2.4.6.1             Cancel Procedure for Rdb with RDO
             2.4.6.2             Cancel Procedure for RMS Files
Chapter 3
3 Writing Step Procedures
     3.1     Using Workspaces with Step Procedures
         3.1.1         Using ACMS-Supplied System Workspaces
         3.1.2         Identifying Workspaces
     3.2     Using Procedures in Distributed Transactions
         3.2.1         Determining the Participation of a Procedure in a Distributed Transaction
         3.2.2         Using Database Transactions or Recovery Units with Distributed Transactions
         3.2.3         Obtaining the Transaction ID (TID)
         3.2.4         Retaining Server Context in Distributed Transactions
         3.2.5         Migrating Existing Step Procedures to Participate in Distributed Transactions
     3.3     Returning Status to the Task Definition
         3.3.1         Returning Status with a Status Return Facility
         3.3.2         Returning Status in User-Defined Workspaces
             3.3.2.1             COBOL Procedure for Returning Status in a User-Defined Workspace
             3.3.2.2             BASIC Procedure for Returning Status in a User-Defined Workspace
     3.4     Handling Error Conditions
         3.4.1         Processing Error Messages
             3.4.1.1             Using a Message File in the Task Definition
             3.4.1.2             Using a Message File in the Step Procedure
             3.4.1.3             Using Hard-Coded Messages in the Form
             3.4.1.4             Using Hard-Coded Messages in the Step Procedure
         3.4.2         Raising Exceptions in Step Procedures
             3.4.2.1             Raising Recoverable Exceptions in Step Procedures
             3.4.2.2             Raising Nonrecoverable Exceptions in Step Procedures
     3.5     Performing Terminal I/O from a Procedure Server
Chapter 4
4 Accessing Resource Managers
     4.1     Using SQL with Rdb
         4.1.1         Using Embedded SQL Statements in Step Procedures
         4.1.2         Using SQL with Distributed Transactions
             4.1.2.1             Defining an SQL Context Structure
             4.1.2.2             Storing the TID in the SQL Context Structure
             4.1.2.3             Passing the Context Structure to SQL
         4.1.3         Starting and Ending SQL Database Transactions
             4.1.3.1             Starting an SQL Database Transaction that is Part of a Distributed Transaction
             4.1.3.2             Starting and Ending an Independent SQL Database Transaction
             4.1.3.3             Using Rdb Transaction Mode and Lock Mode Specifications
             4.1.3.4             Using an Rdb Wait Mode Specification
         4.1.4         Reading from a Database
         4.1.5         Writing to a Database
         4.1.6         Handling Errors
         4.1.7         Compiling Procedures that Use SQL
         4.1.8         COBOL Step Procedure Using SQL with Rdb
     4.2     Using Precompiled RDO or RDML with Rdb
         4.2.1         Using RDO Statements in Step Procedures
         4.2.2         Starting and Ending RDO Database Transactions
             4.2.2.1             Starting an RDO Database Transaction that is Part of a Distributed Transaction
             4.2.2.2             Starting and Ending an Independent RDO Database Transaction
         4.2.3         Reading from a Database
         4.2.4         Writing to a Database
         4.2.5         Handling Errors
         4.2.6         Compiling Rdb Procedures that Use RDO
     4.3     Using DBMS
         4.3.1         Using DBMS DML Statements in Step Procedures
         4.3.2         Starting and Ending a DBMS Database Transaction
             4.3.2.1             Starting a DBMS Database Transaction that Is Part of a Distributed Transaction
             4.3.2.2             Starting and Ending an Independent DBMS Database Transaction
             4.3.2.3             Using DBMS Access and Allow Mode Specifications
             4.3.2.4             Using a DBMS Wait Mode Specification
         4.3.3         Reading from a Database
         4.3.4         Writing to a Database
         4.3.5         Handling Errors
         4.3.6         Compiling DBMS Procedures
     4.4     Using RMS
         4.4.1         Using Files Marked for RMS Recovery-Unit Journaling
         4.4.2         Reading RMS Records
         4.4.3         Writing and Updating RMS Records
         4.4.4         Handling Errors


Previous Next Contents Index