This document is the VAX-11 COBOL-74 User's Guide, published in January 1979 by Digital Equipment Corporation. It serves as a comprehensive manual for programmers on how to use the VAX-11 COBOL-74 compiler with the VAX/VMS V01.5 operating system.
The guide covers the entire program development lifecycle for COBOL applications on the VAX-11 system, detailing a four-step process:
- Creating a Source Program: Instructions on preparing COBOL source files, including choosing reference formats (conventional or terminal).
- Using the Compiler: Explains the compilation process, command-line formats, various compiler options/qualifiers (e.g., for generating listings, debug information, or maps), and how to interpret error messages.
- Linking COBOL-74 Programs: Describes how to use the VAX-11 Linker to combine object modules and libraries (including the COBOL-74 Run-Time System) into executable image files.
- Executing a COBOL Image: Guidance on running compiled programs, including setting and resetting program switches.
Beyond the basic development cycle, the document delves into specific programming topics and system interactions:
- Data Handling: Detailed explanations of non-numeric and numeric data types, their internal representation, organization (group and elementary items), and manipulation using COBOL statements such as
MOVE, STRING, UNSTRING, and INSPECT. It also covers arithmetic operations and associated clauses like ROUNDED and SIZE ERROR.
- Table Handling: Instructions on defining, organizing, initializing, and accessing tables (arrays) using
OCCURS clauses, subscripts, and indexes, along with the SEARCH verb.
- Input-Output Processing: Comprehensive coverage of file attributes, record formats, record sizing, blocking, I/O buffers, file opening procedures, naming conventions (file specifications and logical names), and error handling for various file organizations (sequential, relative, indexed). It also discusses low-volume I/O using
ACCEPT and DISPLAY.
- Good Programming Practices: Recommendations for writing readable, maintainable, and efficient COBOL code, emphasizing formatting, use of level-88 condition names, and avoiding less desirable language features like
ALTER.
- Utilities and Debugging: Introduction to the
REFORMAT utility for source code formatting and a detailed guide on using the VAX-11 Symbolic Debugger for COBOL programs, covering its commands for controlling execution and examining/changing data.
- Sorting in COBOL: How to integrate the VAX-11 SORT utility into COBOL programs using its callable subroutines.
- Optimization: Guidelines for improving program performance by optimizing file design, I/O operations, and computational aspects.
The Appendices provide crucial reference material, including formal COBOL syntax formats, compiler implementation limitations, sample program listings, and comprehensive lists of diagnostic (compile-time) and run-time error messages.