HP 3000 Manuals

HP COBOL II/XL Programmer's Guide MPE/iX 5.0 Documentation


HP COBOL II/XL Programmer's Guide

Table of Contents

 HP COBOL II/XL Programmer's Guide
   HP COBOL II/XL Programmer's Guide : COPYRIGHT NOTICE

   Ch 1.  Introduction
      Debugging COBOL Programs
      Subsystems that Interface with HP COBOL II/XL

   Ch 2.  Features of the 1985 ANSI Standard
       Introduction
      ANSI85 Features
          ANSI85 Features in the IDENTIFICATION DIVISION:
          The INITIAL Clause
             Example
          The COMMON Clause
      ANSI85 Features in the ENVIRONMENT DIVISION
          CLASS Clause
             Example
          SYMBOLIC CHARACTERS Clause
             Example
      ANSI85 Features in the DATA DIVISION
          EXTERNAL Data Items and Files
          FILLER
             Example
          USAGE IS BINARY and USAGE IS PACKED-DECIMAL
             Example
      ANSI85 Features in the PROCEDURE DIVISION
          ADD Statement Enhancement
             Example
          ALPHABETIC-LOWER and ALPHABETIC-UPPER Class Tests
             Example
          CALL BY CONTENT
          De-Editing
             Example
          INITIALIZE Statement
             Example
          INSPECT CONVERTING Statement
             Example 1
             Example 2
             Example 3
          Reference Modification
             Example 1
             Example 2
             Example 3
          Relational Operators
             Example
          REPLACE Statement
             Example
          Setting Switches
             Example
          Setting Condition Names
             Example
          Table Initialization
             Example
      Obsolete Features
      Incompatible Features
          ALPHABET Keyword
             Example
             Justification for Changing the ALPHABET Keyword
          CANCEL and STOP RUN Statements
             Justification for Changing CANCEL and STOP RUN
          EXIT PROGRAM Statement
             Justification for Changing EXIT PROGRAM
          Exponentiation
             Example
             Justification for Changing Exponentiation
          OCCURS Clause
             Example
             Justification for Changing the OCCURS Clause
          READ NEXT after OPEN I-O, WRITE and REWRITE Statements
             Example
             Justification for Changing READ NEXT
          VARYING...AFTER Phrase in PERFORM Statement
             Example
             Justification for Changing PERFORM VARYING
          File Status Codes
             Justification for Changing File Status Codes

   Ch 3.  Programming Practices
       Introduction
      Structured Programming
          END PROGRAM Header
             Example
          IDENTIFICATION DIVISION: COMMON Clause
          DATA DIVISION: GLOBAL Data Items and Files
             Example
          PROCEDURE DIVISION
             CONTINUE Statement
                Example
             EVALUATE Statement
                Example 1
                Example 2
                Example 3
             Explicit Scope Terminators
                Example 1
                Example 2
             NOT Phrases
                Example
             PERFORM Statement Enhancements
                Example 1
                Example 2
                Example 3
                Example 4
             USE GLOBAL AFTER ERROR PROCEDURE ON Statement
                Using a File Open Mode
                Using a GLOBAL File
          When to Use Nested Programs and GLOBAL Data
             Example - A Payroll Application
      Run-Time Efficiency
          Coding Heuristics
             Coding Heuristics when Calling COBOL Functions
          Control Options
          The Optimizer
             Millicode Routines
             When to Use the Optimizer
             Transformations
      Portability
          Portability Between HP 3000 Architectures
          Portability Between HP 3000 and Non-HP Machines
          Cross-Development
          HP Extensions

   Ch 4.  Subprograms and Intrinsics
       Introduction
      External Names
          Example
      Internal Names
          Example
      Chunk and Locality Set Names
          Example 1
          Example 2
      Data Alignment on MPE XL
      Parameter Checking
      Parameter Passing
          Passing Parameters by Reference
          Passing Parameters by Content
          Passing Parameters by Value
          Parameter Alignment
          Passing and Retrieving a Return Value
          Working with the Link Editor
      Call Binding
          Subprogram Libraries
          Compile-Time Binding
             Terminology
                Example
             Call Rules
                Example
          Link-Time Binding
             Examples
          Load-Time Binding
             Examples
          Execution-Time Binding
             Examples
      Switch Stubs
      Calling COBOL Subprograms
          Types of Subprograms
      Calling Non-COBOL Subprograms
          Calling Subprograms Written in C
             Example
          Calling Subprograms Written in FORTRAN 77
             Example
          Calling Subprograms Written in Pascal
             Example
          Calling Subprograms Written in SPL
             Writing Switch Stubs
             Example
                Step 1
                Step 1 Continued
                Step 2
                Screen 1
                Screen 2
                Screen 3
                Screen 4
                Screen 5
                Screen 6
                Screen 7
                Screen 8
                Step 3
                Step 4
                Step 5
                Step 6
                Step 7
      EXTERNAL Data Items and Files
          Example
          EXTERNAL Items and FORTRAN
          EXTERNAL Items and Pascal
          EXTERNAL Items and C
          Sharing EXTERNAL Items
          COBOL, FORTRAN, and Pascal Example
      GLOBAL Data Items and Files
      Calling Intrinsics
          Using $CONTROL CALLINTRINSIC
          How Intrinsics Are Called
          Passing Real Numbers to Intrinsics
             Example

   Ch 5.  Files
       Introduction
      Logical Files
          Sequential Organization Files
             How to Code Sequential Organization Files
                Example 1
             The FILE STATUS Clause
             The BLOCK CONTAINS Clause
             The RESERVE Clause
             The CODE-SET Clause
                Example
             Circular Files
                Example
             Message Files
                Example
             Print Files
      Logical Files (continued)
          Random Access Files
             How to Code Random Access Files
                Example
             Assigning Values to Keys
             Accessing Random Access Files Sequentially
          Relative Organization Files
             How to Code Relative Organization Files
                Sequential Access
                Random Access
                Dynamic Access
                Example
          Indexed Organization Files
             How to Code Indexed Organization Files
                Example
             Creating Indexed Files
                Example
             Sequential Access of Indexed Files
             Random and Dynamic Access
             Generic Keys
                Example
            Duplicate Keys
          Variable Length Records
             Example
      Physical Files
          ASSIGN Clause
          Temporary Physical Files
          BUILD Command
          FILE Command
          Dynamic Files (USING phrase)
             Example
          Multiple Files on a Labelled Tape
      Overwriting Files
      Updating Files
      Appending to Files
          Example
      File Status Codes
          Sequence of Events
          Example 1
          Example 2

   Ch 6. From Program Creationto Program Execution
       Introduction
      Source Program Input
          ASCII File
          TSAM File
          $STDIN File
             Example
      Control File
          Example
      Control Options
          Performance Options
          Listing Options
          Debugging Options
          Migration Options
             RLFILE
                Example 1
                Example 2
             RLINIT
                Example
          Standard Conformance Options
          Interprogram Communication Options
             Example
          Miscellaneous Options
      Compiling, Linking, and Executing Your Program
          Compiler Entry Points and Modes
          File Equations
             Example
          Native Mode Compiler Command Files and RUN Command
          Compatibility Mode Compiler UDCs and Commands
             Syntax of UDCs
             Syntax of Commands
             Parameters
          Libraries
             Relocatable Libraries
                Example
             Executable Libraries
          Examples of Compiling, Linking, and Executing Programs
             Example 1
             Example 2
             Example 3

   Ch 7.  Debugging Your Program
       Introduction
      Control Options for Debugging
      Compiler Listing
      Messages
          Compile-Time Messages
          Run-Time Error Messages
             Input-Output Errors
             Run-Time Traps
             Data Validation
      Using Debug
          Symbol Table Map
          Verb Map
          Link Map
          Maps for Chunked Program
             Example
      Using Debug (continued)
          Example Maps for Nested and Concatenated Programs
          Subprogram Parameters
          Register Meanings
          Calculating Addresses of Data Items
             Example
          Calculating Code Addresses
            Example
          Debugging Trap Errors
             Redirecting Output from Traps
             Illegal ASCII Digit
             Range Error
             No Size Error
             PERFORM Stack Overflow
             Invalid GO TO
            Address Alignment
             Invalid Decimal Data in NUMERIC Class Condition
             Traps with COBOL Functions
             Trace Traps
                Syntax
                Parameters
                Example
      Symbolic Debuggers
          HP Symbolic Debugger/XL
          HP TOOLSET/XL
      Compiler Limits
   INDEX
       Index



MPE/iX 5.0 Documentation