Text preview for : Level_II_COBOL_Language_Reference_Manual_Feb84.pdf part of apple Level II COBOL Language Reference Manual Feb84 apple lisa xenix cobol Level_II_COBOL_Language_Reference_Manual_Feb84.pdf



Back to : Level_II_COBOL_Language_R | Home

LEVEL II COBOL
LANGUAGE REFERENCE
MANUAL

Version 2.0




Micro Focus Limited Issue 6
February 1984



i
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 herewith.

The authors and copyright holders of the copyrighted material used herein:

FLOW-MATIC (Trademark for 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. F28-8013,
copyrighted 1959 by IBM; FACT, DSI27 A5260-2760, copyrighted 1960 by
Minneapolis-Honeywell.

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.




MICRO FOCUS
26 WEST STREET NEW8URY BERKSHIRE RG13 1-.JT
TELEPHONE ( 0 6 3 5 ) 3 2 6 4 6 (10 LINES) 3 2 5 9 5 (7 LINES]
TEL E X 8 4 8"0 4 6 M I C R 0 F G FAX (0635) 33966



M 1M 1M
LEVEL II COBOI: (LEVEL II COBOL), FORMS-2 (FORMS-2) , and ANIMATOR
(ANIMATOR) are trademarks of Micro Focus
IBM is a trademark of IBM Corporation




~ COPYRIGHT 1978, 1984 by Micro Focus Ltd.




ii
LEVEL II COBOL LANGUAGE REFERENCE MANUAL

AMENDMENT RECORD


Issue Dated Inserted by Signature Date
Number


2 Oc tober 1982 - Incorporated in this reprint -

3 December 1982 - Addendum incorporated in this reprint -

4 February 1983 - Addendum 2 incorporated in this reprint-

S July 1983 - Incorporated in this reprint -

6 February 1984 - Typographical corrections -




iii
PREFACE


This manual describes the LEVEL II COBOL language for programming
microcomputers. LEVEL II COBOL is based on the ANSI COBOL standard X3.23
(1974) (see Acknowledgement). It also describes the additional LEVEL II
COBOL features that exploit the capabilities of microprocessors.

Each release of LEVEL II COBOL is characterized by a two-digit code in the
form of

"Version number". "Release number within version"

Note: In the remainder of this manual the full product name LEVEL II COBOL
is abbreviated to L/II COBOL. *'

AUDIENCE

This manual is intended for programmers already familiar with COBOL on other
equipment.

MANUAL ORGANIZATION

Chapters 1 through 4 of the manual apply to all users and describe basic
features of the language. Chapters 5 through 7 describe language features
for programming the three file organization formats supported: sequential,
relative and indexed.

Chapters 8 through 11 apply to all users and describe additional features
and facilities available with the standard language. The appendices supply
reference information pertinent to al~ systemso

The manual contains the following chapters and appendices:

"Chapter 1. Introduction", which gives a general description of the
language, including a broad outline of ANSI COBOL features included and
omitted and additional features of L/Il COBOL.

"Chapter 2. COBOL Concepts", which describes general concepts of the COBOL
language including program structure, and details of statement components
and notation.

"Chapter 3. Nucleus", which describes the nucleus of all COBOL programs and
the layout of each program division in the nucleus.

"Chapter 4. Table Handling", which describes the handling of data tables in
the Data and Procedure divisions of a COBOL program.

"Chapter 5. Sequential Input and Output", which describes the programming of
input and output of data in files with sequential format.


iv (Addendum 1)
"Chapter 6. Relative Inpu t and Output", which desc ribes the programming of
input and output of data in files with relativ"e format.

"Chapter 7. Indexed Input and Output", which describes the programming of
input and output of data in files with indexed format.

"Chapter 8. Sort-Merge", which describes the facility to order one or more
files of records or to combine two or more identically ordered files of
records according to a set of user-specified keys contained wi thin each
record.

"Chapter 9. Segmentation", which describes the facility for specifying
permanent and independent object program segments.

"Chapter 10. Library", which describes the source library maintenance
feature of COBOL.

"Chapter 11. Debug and Interactive Debugging", which describes the basic and'
interactive debugging features available in L/II COBOL.

"Chapter 12. Interprogram Communication", which describes the ability of
L/lI COBOL programs to interface during running and to access common data,
enabling modular programming.

"Chapter 13. Communication", which describes the facility to communicate
through a Message Control System (MCS) with local and remote devices, and to
access, process and create messages or portions thereof.

"Chapter 14. Programming Techniques and Sizing", which describes the means
available for L/ll COBOL programmers to estimate object program size and
includes programming techniques in L/II COBOL.

"Appendix A. Reserved Word Table", which lists words reserved for L/Il COBOL
functions within a program.

"Appendix B. Character Set and Collating Sequence", which lists all
characters available and their collating sequence.

"Appendix C. Glossary", which lists specific terms used in L/II COBOL.

"Appendix D. Compile - Time Errors", which lists all errors that can be
signalled during program compilation.

"Appendix E. Run-Time Errors", which lists all errors that can be signalled
during program execution.

"Appendix F. Synta"'{ Summary", which summarizes the syntax used in L/II
COBOL programming.

"Appendix G. Summary of Extensions to ANSI COBOL", which summarizes all
extensions to ANSI COBOL provided by L/II COBOL.



v
"Appendix H. System Dependent Language Features", which describes the
system dependent L/II COBOL entries for use with microcomputers and those
features not included because of hardware requirements.

"Appendix I. Language Specification", which is an overall specification of
the L/II COBOL language.

"Appendix J. IBM Extensions", which describes some L/II COBOL extensions
that are compatible with the IBM 8100 DPPX COBOL implementation.

RELATED PUBLICATIONS

No discussion of operating the L/II COBOL Compiler or Run-Time system is
incorporated in this manual. Please refer to document:
L/II COBOL Operating Guide
(for use with the relevant Operating System)


NOTATION IN THIS MANUAL

Throughout this manual, the following notation is used to describe the
format of COBOL statements:

1. All words printed in capital letters which are underlined must always
be present when the functions of which they are a part are used. An
error printout will occur during compilation if the underlined words
are absent or incorrectly spelled. The underlining is not necessary
when writing a COBOL source program.

2. All words printed in capital letters which are not underlined are used
for readability only. They may be written, or not, as the programmer
wishes.

3. All words printed in small letters are generic terms representing
names which will be devised by the programmer.

4. When material is enclosed in braces { } , a choice must be made from
the options within them.

5. When material is enclosed in square brackets [ ], it is an indication
that the material is an option which may be included or omitted as
required.

6. When material is enclosed in square brackets crossed t- +, it is an
indication that the material is mandatory when the ANSI switch is set
(see Chapter 2) but optional otherwise.

7. Language features that are shaded in the text are language extensions
which exceed the ANSI 1974 standard, as are ANSI 1974- features that
are treated as for documentary purposes only in LEVEL I I COBOL. See
note at the end of this Preface.




vi (Addendum 1)
9. In text, the ellipsis shows the omission of a portion of a
(. 0