6
Processing Files and Records
The Compaq COBOL I/O system offers you a wide range of record management
techniques while remaining transparent to you. You can select one of several
file organizations and access modes, each of which is suited to a particular
application. The file organizations available through Compaq COBOL are
sequential, line sequential, relative, and indexed. The access modes are
sequential, random, and dynamic.
This chapter introduces you to the following Compaq COBOL I/O features:
•
Defining files and records (Section 6.1)
•
Identifying files and records from your Compaq COBOL program (Section 6.2)
•
Creating and processing files (Section 6.3)
•
Reading files (Section 6.4)
•
Updating files (Section 6.5)
•
Backing up your files (Section 6.6)
For information about low-volume or terminal screen I/O using the ACCEPT
and DISPLAY statements, see Chapter 11 and the Compaq COBOL Reference
Manual.
The operating system provides you with I/O services for handling, controlling,
and spooling your I/O needs or requests. Compaq COBOL, through the I/O
system, provides you with extensive capabilities for data storage, retrieval, and
modification.
On the OpenVMS Alpha operating system, the Compaq COBOL I/O system
consists of the Run-Time Library (RTL), which accesses Record Management
Services (RMS). Refer to the OpenVMS Record Management Utilities Reference
Manual and the OpenVMS Record Management Services Reference Manual for
more information about RMS.
♦
On the Tru64 UNIX operating system, the Compaq COBOL I/O system consists
of the Run-Time Library (RTL) and facilities of Tru64 UNIX. In addition,
the facilities of a third-party ISAM package are required for any use of
ORGANIZATION INDEXED.
♦
6.1 Defining Files and Records
A file is a collection of related records. You can specify the organization and size
of a file as well as the record format and physical record size. The system creates
a file with these characteristics and stores them with the file. Any program that
accesses a file must specify the same characteristics as those that the system
stored for that file when creating it.
Processing Files and Records 6–1
Содержание COBOL AAQ2G1FTK
Страница 22: ......
Страница 30: ......
Страница 94: ......
Страница 110: ......
Страница 146: ......
Страница 180: ......
Страница 194: ...Processing Files and Records 6 1 Defi...
Страница 300: ......
Страница 490: ......
Страница 516: ......
Страница 517: ......
Страница 530: ......
Страница 534: ......
Страница 590: ......
Страница 620: ......