HP COBOL II/XL Quick Reference Guide : COPYRIGHT NOTICE [ HP COBOL II/XL Quick Reference Guide ] MPE/iX 5.0 Documentation
HP COBOL II/XL Quick Reference Guide
HP COBOL II/XL Quick Reference Guide
Printed in U.S.A.
Series 900 HP 3000 Computer Systems
HP Part No. 31500-90003
Edition E0791
Printed July 1991
Notice
The information contained in this document is subject to change without
notice.
HEWLETT-PACKARD MAKES NO WARRANTY OF ANY KIND WITH REGARD TO THIS
MATERIAL, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. Hewlett-Packard
shall not be liable for errors contained herein or for incidental or
consequential damages in connection with the furnishing, performance or
use of this material.
Hewlett-Packard assumes no responsibility for the use or reliability of
its software on equipment that is not furnished by Hewlett-Packard.
This document contains proprietary information which is protected by
copyright. All rights are reserved. No part of this document may be
photocopied, reproduced, or translated to another language without the
prior written consent of Hewlett-Packard Company
Copyright (c) 1987, 1988, 1991 by HEWLETT-PACKARD COMPANY
This document contains information which is protected by copyright. All
rights are reserved. Reproduction, adaptation, or translation without
prior written permission is prohibited, except as allowed under the
copyright laws.
Restricted Rights Legend. Use, duplication, or disclosure by the U.S.
Government is subject to restrictions as set forth in subparagraph (c)
(1) (ii) of the Rights in Technical Data and Computer Software clause at
DFARS 252.227-7013 for DOD agencies, and subparagraphs (c) (1) and (c)
(2) of the Commercial Computer Software Restricted Rights clause at FAR
52.227-19 for other agencies.
HEWLETT-PACKARD COMPANY
3000 Hanover Street
Palo Alto, California 94304 U.S.A.
Printing History
New editions are complete revisions of the manual. The dates on the
title page change only when a new edition is published.
The software code printed alongside the data indicates the version level
of the software product at the time the manual or update was issued.
Many product updates and fixes do not require manual changes and,
conversely, manual corrections may be done without accompanying product
changes. Therefore, do not expect a one to one correspondence between
product updates and manual updates.
First Edition November 1987 31500A.00.12
Second Edition October 1988 31500A.01.06
Third Edition July 1991 31500A.04.03
Preface
This is a quick reference guide for the HP COBOL II programming language
on the MPE XL operating system. HP COBOL II is based on the ANSI
COBOL'1974 and ANSI COBOL'1985 Standard X3.23-1985.
This guide is intended for programmers who have a working knowledge of
COBOL. It summarizes HP COBOL II language elements and gives the
syntax[REV BEG] for statements, commands, compiler directives, and COBOL
functions.[REV END]
This manual is organized as follows:
Chapter 1 Preprocessor Commands and $CONTROL Options
Chapter 2 Program Format
[REV BEG]
Chapter 3 IDENTIFICATION DIVISION Statements
Chapter 4 ENVIRONMENT DIVISION Statements
Chapter 5 DATA DIVISION Statements
Chapter 6 PROCEDURE DIVISION Statements
Chapter 7 COBOL Reserved Word List[REV END]
Appendix A HP COBOL II/XL Compiler Commands
Appendix B HP COBOL II/V Compiler Commands
Appendix C MPE XL Run-Time Trap Handling
Appendix D COBEDIT Program
[REV BEG]
Appendix E COBOL Functions[REV END]
What's New in This Release
[REV BEG]
The following lists major changes to this manual since the last edition:
* Addition of Appendix E, which describes the built-in COBOL
functions recently defined by Addendum 1 of the ANSI COBOL'85
standard.
* Reorganization of the IDENTIFICATION, ENVIRONMENT, DATA, and
PROCEDURE DIVISION statements (Chapters 3 through 6).
* Miscellaneous changes identified with change bars in the side
margins.
[REV END]
Additional Documentation
More information on HP COBOL II/XL is in the following manuals:
* HP COBOL II/XL Reference Manual (31500-90001)
* HP COBOL II/XL Programmer's Guide (31500-90002)
* HP COBOL II/XL Migration Guide (31500-90004)
Acknowledgement
At the request of the American National Standards Institute (ANSI), the
following acknowledgement is reproduced in its entirety:
Any organization interested in reproducing the COBOL standard and
specifications in whole or in part, using ideas from this document
as the basis for an instruction manual or for any other purpose, is
free to do so. However, all such organizations are requested to
reproduce the following acknowledgement paragraphs in their entirety
as part of the preface to any such publication (any organization
using a short passage from this document, such as in a book review,
is requested to mention "COBOL" in acknowledgement of the source,
but need not quote the acknowledgement):
COBOL is an industry language and is not the property of any company
or group of companies, or of any organization or group of
organizations.
No warranty, expressed or implied, is made by any contributor or by
the CODASYL Programming Language Committee as to the accuracy and
functioning of the programming system and language. Moreover, no
responsibility is assumed by any contributor, or by the committee,
in connection therewith.
The authors and copyright holders of the copyrighted material used
herein have specifically authorized the use of this material in
whole or in part, in the COBOL specifications. Such authorization
extends to the reproduction and use of COBOL specifications in
programming manuals or similar publications.
FLOW-MATIC (trademark of Sperry Rand Corporation), Programming for
the Univac(R) I and II, Data Automation Systems copyrighted 1958,
1959, by Sperry Rand Corporation; IBM Commercial Translator Form No.
F 28-8013, copyrighted 1959 by IBM, FACT, DSI 27A5260-2760,
copyrighted 1960 by Minneapolis-Honeywell.
Conventions
Notation Description
[REV BEG]
Change bars in the margin show where substantial changes
have been made to this manual since the last
edition.[REV END]
UPPERCASE and Within syntax statements, characters in uppercase must
UNDERLINING be entered in exactly the order shown. Uppercase words
that are underlined are keywords that are always
required when the clause or statement in which they
appear is used in your program. Uppercase words that
are not underlined are optional, and may be included or
omitted. They have no effect on program execution and
serve only to make source program listings more
readable. The following example illustrates this:
[FILE STATUS IS stat-item].
STATUS must be entered, FILE may be either included or
omitted. See also "Underlining in dialog" on the
following page.
italics Within syntax statements, a word in italics represents a
formal parameter, argument, or literal that you must
replace with an actual value. In the following example,
you must replace filename with the name of the file you
want to release:
RELEASE filename
punctuation Within syntax statements, punctuation characters (other
than brackets, braces, vertical parallel lines, and
ellipses) must be entered exactly as shown.
{ } Within syntax statements, when several elements within
braces are stacked, you must select one. In the
following equivalent examples, you select ON or OFF:
{ON }
SETMSG {OFF}
SETMSG {ON }
{OFF}
{| |} Within syntax statements, bars in braces are choice
indicators. One or more of the items within the choice
indicators must be specified, but a single option may be
specified only once.
[ ] Within syntax statements, brackets enclose optional
elements. In the following example, brackets around
,TEMP indicate that the parameter and its delimiter are
not required:
PURGE filename[,TEMP]
When several elements within brackets are stacked, you
can select any one of the elements or none. In the
following equivalent examples, you can select devicename
or deviceclass or neither:
[devicename]
SHOWDEV [deviceclass]
SHOWDEV [devicename ]
[deviceclass]
Underlining in When it is necessary to distinguish user input from
dialog computer output, the input is underlined. See also
underlining on the previous page.
NEW NAME? ALPHA
[ ] ... Brackets followed by a horizontal ellipsis indicate
either that a previous bracketed element may be repeated
zero or more times, or that elements have been omitted
from the description.
[WITH DUPLICATES] ...
The ellipsis shows that the preceding clause may be
repeated indefinitely.
{ } ... Braces followed by a horizontal ellipses indicate either
that the item within braces may be repeated one or more
times, or that elements have been omitted from the
description.
_ Within syntax statements, the space symbol _ shows a
required blank. In the following example, you must
separate modifier and variable with a blank:
SET [(modifier)]_(variable);
<, >, =, <=, These symbols are used in conditional statements to
>=, <> represent the keywords LESS THAN, GREATER THAN, EQUAL
TO, LESS THAN OR EQUAL TO, GREATER THAN OR EQUAL TO, and
NOT EQUAL TO, respectively. Although these symbols
represent keywords, they are not underlined.
; The semicolon is used only to improve readability and is
always optional.
, The comma is used only to improve readability, and is
always optional.
. The period is a terminator or delimiter that is always
required where shown; it must always be entered at the
end of every division name, section name, paragraph
name, and sentence.
^ The caret is occasionally used in examples to represent
an implied decimal point in computer memory.
Shading Features that are part of the 1985 ANSI standard are
shaded. They are accessible through the ANSI85 entry
point.
LG200026_198 In some diagrams and tables, a number appears in the
lower left corner. This number is for HP control
purposes only and should not be interpreted as part of
the diagram or table.
MPE/iX 5.0 Documentation