[an error occurred while processing this directive]

HP OpenVMS Systems Documentation

Content starts here

HP COBOL

Reference Manual

Order Number: AA--Q2G0H--TK


January 2005

This manual provides reference information and syntax for the HP COBOL programming language on its platforms: OpenVMS Alpha, OpenVMS Industry Standard 64, OpenVMS VAX, and Tru64 UNIX Alpha.

Revision/Update Information: This manual supersedes the Compaq COBOL Reference Manual, Version 2.8 and the VAX COBOL Reference Manual, Version 5.4, as well as the online-only Compaq COBOL Reference Manual, Version 2.8 and Version 5.7.

Operating System and Version: OpenVMS I64 Version 8.2 OpenVMS Alpha Version 6.2 or higher OpenVMS VAX Version 6.2 or higher Tru64 UNIX Version 5.1 or higher

Software Version:
HP COBOL for OpenVMS Alpha Version 2.8 HP COBOL for Tru64 UNIX Version 2.8 HP COBOL for OpenVMS VAX Version 5.7A



Hewlett-Packard Company
Palo Alto, California


© Copyright 2005 Hewlett-Packard Development Company, L.P.

Confidential computer software. Valid license from HP required for possession, use or copying. Consistent with FAR 12.211 and 12.212, Commercial Computer Software, Computer Software Documentation, and Technical Data for Commercial Items are licensed to the U.S. Government under vendor's standard commercial license.

The information contained herein is subject to change without notice. The only warranties for HP products and services are set forth in the express warranty statements accompanying such products and services. Nothing herein should be construed as constituting an additional warranty. HP shall not be liable for technical or editorial errors or omissions contained herein.

Intel and Itanium are trademarks or registered trademarks of Intel Corporation or its subsidiaries in the United States and other countries.

Motif, UNIX®, and X/Open® are trademarks of The Open Group in the U.S. and/or other countries.

All other product names mentioned herein may be trademarks of their respective companies.

Printed in the US

ZK6296

This manual is available on CD-ROM.

Contents Index


Preface

This book describes the constructs and rules of the HP COBOL programming language, which is a Hewlett-Packard Company implementation of COBOL (COmmon Business-Oriented Language) for the OpenVMS and Tru64 UNIX platforms. It includes information about language syntax and semantics, as well as information about adherence and extensions to various COBOL standards.

This documentation set also includes the HP COBOL User Manual and, optionally, the HP COBOL DBMS Database Programming Manual.

HP COBOL is the new name for what has formerly been known as Compaq COBOL, DEC COBOL, DIGITAL COBOL, and VAX COBOL. HP COBOL, unmodified, refers to the following products:

HP COBOL for OpenVMS Industry Standard 64
HP COBOL for OpenVMS Alpha
HP COBOL for Tru64 UNIX
HP COBOL for OpenVMS VAX

Any references to the former names in product documentation or other components should be construed as references to the HP COBOL names.

Intended Audience

This manual is intended for experienced applications programmers who have a thorough understanding of the COBOL language and some familiarity with their operating system. This is not a tutorial manual.

If you are a new COBOL user, you may need to read introductory COBOL textbooks or take COBOL courses.

Structure of This Document

This manual is organized as follows:

  • Chapter 1 presents the elements of the COBOL language, describes two format options for a COBOL program, and explains how the remaining chapters organize and present the COBOL general formats.
  • Chapter 2 describes the organization of a COBOL program. It presents the general format for the four COBOL divisions and introduces the concept of contained programs. This chapter shows the relationship between a program name and a source file name.
  • Chapter 3 describes the general format and contents of the Identification Division. It explains how to identify a COBOL program and its source listing.
  • Chapter 4 describes the general format and contents of the Environment Division. It explains how to describe the program's physical environment.
  • Chapter 5 describes the general format and contents of the Data Division. It explains how to describe data the program receives, creates, manipulates, and produces as output.
  • Chapter 6 describes the general format and contents of the Procedure Division. It describes COBOL verbs, which process the files and data in the Environment and Data Divisions.
  • Chapter 7 describes the general format and use of the intrinsic functions.
  • Chapter 8 describes the general format of the COPY and REPLACE statements.
  • Appendix A lists the HP COBOL reserved words, which are words that cannot be used as system names or user-defined names.
  • Appendix B lists the ASCII, EBCDIC, and NATIVE character sets.
  • Appendix C lists the exception condition values that can appear in File Status data items.
  • Appendix D contains individual presentation rules and tables for each type of report group.
  • Appendix E describes RTL routines for accessing the RAB and FAB structures on OpenVMS systems.
  • The Glossary contains an alphabetical listing of common HP COBOL terms and their definitions.
  • The Index indexes and references terms and concepts in this manual.

Associated Documents

The following documents contain additional information directly related to various topics covered in this manual:

HP COBOL User Manual

This manual describes how to use features of the HP COBOL language to develop programs on the Tru64 UNIX operating system or the OpenVMS operating systems on Alpha, I64, and VAX.

Release Notes

Consult the HP COBOL release notes for your installed version for late corrections and new features.

On the OpenVMS Alpha, I64, or VAX operating system, the release notes are in:

SYS$HELP:COBOLnnn.RELEASE_NOTES (ASCII text)
SYS$HELP:COBOLnnn_RELEASE_NOTES.PS

Where nnn is the version and release number.

On the Tru64 UNIX operating system, the release notes are in:

/usr/lib/cmplrs/cobol/relnotes

Compaq COBOL for Tru64 UNIX Systems Installation Guide

This manual provides instructions for installing HP COBOL on the Tru64 UNIX operating system.

HP COBOL for OpenVMS Alpha and I64 Systems Installation Guide

This manual provides instructions for installing HP COBOL on the OpenVMS Alpha and OpenVMS I64 operating systems.

Compaq COBOL for OpenVMS VAX Systems Installation Guide

This manual provides instructions for installing HP COBOL on the OpenVMS VAX operating system.

HP COBOL DBMS Database Programming Manual

This manual provides information on using HP COBOL for database programming with Oracle CODASYL DBMS on the OpenVMS Alpha, the OpenVMS I64, or OpenVMS VAX operating systems.

The OpenVMS Calling Standard and other manuals in the OpenVMS Documentation Set

This set contains information about using the features of the OpenVMS I64, OpenVMS Alpha, and OpenVMS VAX operating systems and their tools.

The Tru64 UNIX Documentation Set

This set contains introductory and detailed information about using the features of the Tru64 UNIX operating system and its tools.

The Alpha Architecture Reference Manual

This manual is available from Digital Press.


Next Contents Index