Document revision date: 30 March 2001
[Compaq] [Go to the documentation home page] [How to order documentation] [Help on this site] [How to contact us]
[OpenVMS documentation]

Guide to Creating OpenVMS Modular Procedures

Begin Index

Contents (summary)
Preface Preface
Chapter 1 Introduction to Modular Procedures
Chapter 2 Designing Modular Procedures
Chapter 3 Coding Modular Procedures
Chapter 4 Testing Modular Procedures
Chapter 5 Integrating Modular Procedures
Chapter 6 Maintaining Modular Procedures
Appendix A Summary of Modular Programming Guidelines


Preface Preface
Chapter 1
1 Introduction to Modular Procedures
     1.1     Why Bother with Modular Procedures?
     1.2     Invoking a Modular Procedure
     1.3     Using Procedure Libraries
     1.4     Existing System Procedures
     1.5     Using Translated Images (Alpha Only)
Chapter 2
2 Designing Modular Procedures
     2.1     Organizing New Applications
         2.1.1         Organizing Files and Modules
         2.1.2         Organizing Procedures into Modules
     2.2     Defining a Modular Procedure Interface
         2.2.1         Explicit Arguments
         2.2.2         Implicit Arguments
                Implicit Arguments Allocated by the Calling Program
                Implicit Arguments Allocated by the Called Procedure
         2.2.3         How to Avoid Using Implicit Arguments
                Combining Procedures
                User-Action Routine
                Designating Responsibility to the Calling Program
         2.2.4         Order of Arguments
         2.2.5         Using Optional Arguments
     2.3     JSB Entry Points (VAX Only)
     2.4     Using System Resources
         2.4.1         Choosing a Storage Type
                Stack Storage
                Heap Storage
                Static Storage
                Avoiding Use of Static Storage
                Summary of Storage Use by Language
         2.4.2         Using Event Flags
         2.4.3         Using Logical Unit Numbers
     2.5     Using Input/Output
         2.5.1         Terminal Input/Output
         2.5.2         File Input/Output
     2.6     Documenting Modules
         2.6.1         Writing a Module Preface
         2.6.2         Writing a Procedure Description
     2.7     Planning for Signaling and Condition Handling
         2.7.1         Guidelines for Signaling Error Conditions
         2.7.2         Guidelines for Returning Condition Values
         2.7.3         When to Signal or Return Condition Values
Chapter 3
3 Coding Modular Procedures
     3.1     Coding Guidelines
         3.1.1         Adhering to the Naming Conventions
                Facility Naming Conventions (Recommended)
                Procedure Naming Conventions (Recommended)
                File Naming Conventions (Recommended)
                Module Naming Conventions (Required)
                PSECT Naming Conventions (Required)
                Lock Resource Naming Conventions (Recommended)
                Global Variable Naming Conventions (Recommended)
                Status Code and Condition Value Naming Conventions (Required)
         3.1.2         Using Common Source Files (Recommended)
         3.1.3         Using OpenVMS System Services
         3.1.4         Invoking Optional User-Action Routines
                Bound Procedure Value (VAX Only)
     3.2     Initializing Modular Procedures
         3.2.1         Initializing Storage
         3.2.2         Testing and Setting a First-Time Flag
         3.2.3         Using LIB$INITIALIZE
     3.3     Writing AST-Reentrant Code
         3.3.1         What Is an AST?
         3.3.2         AST Reentrancy Versus Full Reentrancy
         3.3.3         Writing AST-Reentrant Modular Procedures
         3.3.4         How to Eliminate Race Conditions During Concurrent Access
                Performing All Accesses in One Instruction
                Using Test and Set Instructions
                Keeping a Call-in-Progress Count
                Disabling AST Interrupts
         3.3.5         Performing Input/Output at AST Level
         3.3.6         Condition Handling at AST Level
Chapter 4
4 Testing Modular Procedures
     4.1     Unit Testing
         4.1.1         Black Box Testing
         4.1.2         White Box Testing
     4.2     Language-Independence Testing
     4.3     Integration Testing
         4.3.1         All-at-Once Approach to Integration Testing
         4.3.2         Incremental Approach to Integration Testing
     4.4     Testing for Reentrancy
         4.4.1         Checking for AST Reentrancy
                Using the Debugger to Check for AST Reentrancy
                Using Desk Checking to Check for AST Reentrancy
         4.4.2         Checking for Full Reentrancy
     4.5     Performance Analysis
         4.5.1         SHOW Entry Point
         4.5.2         STAT Entry Point
     4.6     Monitoring Procedures in the Run-Time Library

Previous Next Contents Index

  [Go to the documentation home page] [How to order documentation] [Help on this site] [How to contact us]  
  privacy and legal statement