Compaq COBOL
User Manual


Previous Contents Index

Appendix C
Appendix C Programming Productivity Tools
     C.1     Debugging Tools for Compaq COBOL Programs
     C.2     Ladebug Debugger (Tru64 UNIX)
     C.3     OpenVMS Debugger (OpenVMS)
         C.3.1         Notes on Compaq COBOL Support
         C.3.2         Notes on Debugging Optimized Programs (Alpha)
         C.3.3         Sample Debugging Session (Alpha)
             C.3.3.1             Separately Compiled Programs
     C.4     Language-Sensitive Editor (LSE) and the Source Code Analyzer (SCA) (OpenVMS)
         C.4.1         Notes on Compaq COBOL Support
         C.4.2         Preparing an SCA Library
         C.4.3         Starting and Terminating an LSE or an SCA Session
         C.4.4         Compiling from Within LSE
     C.5     Using Oracle CDD/Repository (OpenVMS)
         C.5.1         Creating Record and Field Definitions
         C.5.2         Accessing Oracle CDD/Repository Definitions from Compaq COBOL Programs
         C.5.3         Recording Dependencies
         C.5.4         Data Types
         C.5.5         For More Information
Appendix D
Appendix D Porting to Compaq COBOL from Other Compilers (Alpha)
     D.1     Porting Assistance
     D.2     Flagged Foreign Extensions
     D.3     Implemented Extensions
Index
Index
Examples
1-1 Accessing Environment Variables and Command-Line Arguments
1-2 Main Program and Subprograms
1-3 Command Procedure to Compile and Link Subprograms as Shareable Images (OpenVMS Alpha)
1-4 Command Procedure to Compile, Link, and Install Subprograms as Shareable Images (OpenVMS VAX)
1-5 Transfer Vectors (OpenVMS VAX)
1-6 Accessing Logicals and Command-Line Arguments (Alpha)
1-7 Using RMS Special Registers to Detect Errors (OpenVMS)
1-8 Using RMS-CURRENT Special Registers to Detect Errors (OpenVMS)
2-1 Success/Failure Test
3-1 Item Concatenation Using Two MOVE Statements
3-2 Sample Record Description Using the MOVE CORRESPONDING Statement
4-1 One-Dimensional Table
4-2 Multiple Data Items in a One-Dimensional Table
4-3 Defining a Table with an Index and an Ascending Search Key
4-4 Defining a Two-Dimensional Table
4-5 Defining a Three-Dimensional Table
4-6 Defining a Variable-Length Table
4-7 Sample Record Description Defining a Table
4-8 Record Description Containing a COMP SYNC Item
4-9 Adding an Item Without Changing the Table Size
4-10 How Adding 3 Bytes Adds 4 Bytes to the Element Length
4-11 Initializing Tables with the VALUE Clause
4-12 Initializing a Table with the OCCURS Clause
4-13 Initializing Mixed Usage Items
4-14 Initializing Alphanumeric Items
4-15 Using a Literal Subscript to Access a Table
4-16 Subscripting a Multidimensional Table
4-17 Subscripting with Index Name Items
4-18 Sample Table
4-19 A Serial Search
4-20 Using SEARCH and Varying an Index Other than the First Index
4-21 Using SEARCH and Varying an Index Data Item
4-22 Using SEARCH and Varying an Index not Associated with the Target Table
4-23 Doing a Serial Search Without Using the VARYING Phrase
4-24 A Multiple-Key, Binary Search
5-1 Using the STRING Statement and Literals
5-2 Sample Overflow Condition
6-1 Sample Record Description
6-2 Determining Fixed-Length Record Size
6-3 Determining Fixed-Length Record Size for Files with Multiple Record Descriptions
6-4 Creating Variable-Length Records with the DEPENDING ON Phrase
6-5 Creating Variable-Length Records with the RECORD VARYING Phrase
6-6 Creating Variable-Length Records and Using the OCCURS Clause with the DEPENDING ON Phrase
6-7 Defining Fixed-Length Records with Multiple Record Descriptions
6-8 Defining a Disk File
6-9 Defining a Magnetic Tape File (OpenVMS)
6-10 Defining a Magnetic Tape File (Tru64 UNIX)
6-11 Using Environment Variables (Tru64 UNIX) or Logical Names (OpenVMS) for File Specification
6-12 Using Environment Variables
6-13 Specifying Sequential File Organization and Sequential Access Mode for a Sequential File
6-14 Specifying Relative File Organization and Random Access Mode for a Relative File
6-15 Specifying Indexed File Organization and Dynamic Access Mode for an Indexed File
6-16 Specifying Line Sequential File Organization with Sequential Access Mode (Alpha)
6-17 SELECT Statements for Sequential Files with Sequential Access Mode
6-18 SELECT Statements for Relative Files with Sequential and Dynamic Access Modes
6-19 SELECT Statements for Indexed Files with Dynamic and Default Sequential Access Modes
6-20 SELECT Statements for Line Sequential Files with Sequential Access Modes (Alpha)
6-21 OPEN and CLOSE Statements
6-22 Creating a Sequential File
6-23 Creating a Line Sequential File (Alpha)
6-24 Creating a Relative File in Sequential Access Mode
6-25 Creating a Relative File in Random Access Mode
6-26 Creating and Populating an Indexed File
6-27 Using Segmented Keys
6-28 Reading a Sequential File
6-29 Reading a Relative File Sequentially
6-30 Reading a Relative File Randomly
6-31 Reading a Relative File Dynamically
6-32 Reading an Indexed File Sequentially
6-33 Reading an Indexed File Randomly
6-34 Reading an Indexed File Dynamically
6-35 Reading an Indexed File Dynamically, with READ PRIOR (Alpha)
6-36 Another Example of READ PRIOR (Alpha)
6-37 Rewriting a Sequential File
6-38 Extending a Sequential File or Line Sequential File (Alpha)
6-39 Rewriting Relative Records in Sequential Access Mode
6-40 Rewriting Relative Records in Random Access Mode
6-41 Deleting Relative Records in Sequential Access Mode
6-42 Deleting Relative Records in Random Access Mode
6-43 Updating an Indexed File Sequentially
6-44 Updating an Indexed File Randomly
7-1 Handling the AT END Condition
7-2 Handling the Invalid Key Condition
7-3 Defining a File Status for a File
7-4 Using the File Status Value in an Exception Handling Routine
7-5 Referencing RMS-STS, RMS-STV, RMS-CURRENT-STS, and RMS-CURRENT-STV Codes (OpenVMS)
7-6 The Declaratives Skeleton
7-7 A Declarative USE Procedure Skeleton
7-8 Five Types of Declarative USE Procedures
8-1 X/Open Standard Lock Modes and Opening Files (Alpha)
8-2 Program Segment for File Status Values
8-3 Program Segment for RMS-STS Values (OpenVMS)
8-4 X/Open Standard Record Locking (Alpha)
8-5 Automatic Record Locking (Compaq Standard)
8-6 Sample Program Using Manual Record Locking (Compaq Standard)
8-7 Program Segment for Record-Locking Exceptions
9-1 INPUT and OUTPUT PROCEDURE Phrases
9-2 USING Phrase Replaces INPUT PROCEDURE Phrase
9-3 Overriding the COLLATING SEQUENCE IS Phrase
9-4 Using Two Sort Files
9-5 The Declarative USE AFTER STANDARD ERROR PROCEDURE
9-6 Using the MERGE Statement
9-7 Sorting a File with the USING and GIVING Phrases
9-8 Using the USING and OUTPUT PROCEDURE Phrases
9-9 Using the INPUT PROCEDURE and OUTPUT PROCEDURE Phrases
9-10 Using the COLLATING SEQUENCE IS Phrase
9-11 Creating a New Sort Key
9-12 Merging Files
10-1 Components of a Report
10-2 Checking for the Page-Overflow Condition
10-3 Page Advancing and Line Skipping
10-4 Checking for End-of-Page on a 28-Line Logical Page
10-5 Programming a 20-Line Logical Page Defined by the LINAGE Clause with Automatic Page Overflow
10-6 Sample Program EX1006
10-7 Sample Program EX1007
10-8 Sample Program EX1008
10-9 Sample Program EX1009
10-10 Sample Program EX1010
10-11 Printing Labels Four-Up
10-12 Printing Labels Four-Up in Sort Order
11-1 Erasing a Screen
11-2 Cursor Positioning
11-3 Using PLUS for Cursor Positioning
11-4 Using Character Attributes
11-5 Using the CONVERSION Phrase
11-6 Using the ON EXCEPTION Phrase
11-7 Using the SIZE and PROTECTED Phrases
11-8 Using the NO ECHO Phrase
11-9 Using the DEFAULT Phrase
11-10 Using the CONTROL KEY IN Phrase
11-11 EDITING Phrase Sample Code
11-12 Designing a Video Form for a Daily Calendar (Alpha)
12-1 Run Unit with Three Separately Compiled Programs
12-2 Run Unit with a Main Program and Two Contained Programs
12-3 Run Unit with Three Separately Compiled Programs, One with Two Contained Programs
12-4 Execution Sequence of Nested CALL Statements
12-5 Sequence of Messages Displayed
12-6 CALL Literal Versus CALL Data Name
12-7 Using the COMMON Clause
12-8 Calling a COBOL Program from C (Alpha)
12-9 C Include File cobfunc.h (Alpha)
12-10 COBOL Called Program "CALLEDFROMC" (Alpha)
12-11 C Program Using cobcall, cobfunc, and cobcancel (Alpha)
12-12 COBOL Called Program "PROGCOB" (Alpha)
12-13 Calling a Fortran Program from a COBOL Program
12-14 Fortran Subroutine SQROOT
12-15 Calling a BASIC Program from a COBOL Program
12-16 BASIC Program "APP" and Output Data
12-17 C Routine to Be Called from a COBOL Program
12-18 Calling a C Program from a COBOL Program
13-1 User-Written Condition Handler
13-2 Random Number Generator (OpenVMS)
13-3 Using the SYS$SETDDIR System Service (OpenVMS)
13-4 Using$ASCTIM (OpenVMS)
13-5 Sample Run of CALLTIME (OpenVMS)
13-6 Using LIB$K_* and LIB$_* Symbols (OpenVMS)
16-1 Using*DC SET ALIGNMENT Directives
16-2 Using /ALIGNMENT with SYNCHRONIZED
16-3 Comparing /NOALIGN, /ALIGN and /ALIGN =PADDING (Alpha)
16-4 Data Map for /NOALIGNMENT (Alpha)
16-5 Data Map for /ALIGNMENT, -align (Alpha)
16-6 Data Map for /ALIGNMENT =PADDING, -align pad (Alpha)
B-1 Signed and Unsigned Differences
B-2 Illegal Return Value Coding
C-1 Source Code Used in the Sample Debug Sessions


Previous Next Contents Index