4.2.8.3 Relationship Between Data Organizations and Access Modes
The following lists which access modes are valid for each type of data
organization.
-
Sequential Files
-
Files with sequential organization can be accessed only sequentially.
The sequence in which records are accessed is the order in which the
records were originally written.
-
X Line Sequential Files
-
X Same as for sequential files (described above).
-
Indexed Files
-
All three access modes are allowed.
In the sequential access mode, the sequence in which records are
X accessed is the ascending order (or optionally under AIX, OS/2, and
X Windows, descending order) of the record key value. The order of
retrieval within a set of records having duplicate alternate record
key values is the order in which records were written into the set.
In the random access mode, you control the sequence in which records
are accessed. The desired record is accessed by placing the value of
its key(s) in the RECORD KEY data item (and the ALTERNATE RECORD KEY
data item). If a set of records has duplicate alternate record key
values, only the first record written is available.
In the dynamic access mode, you can change, as necessary, from
sequential access to random access, using appropriate forms of
input-output statements.
-
Relative Files
-
All three access modes are allowed.
In the sequential access mode, the sequence in which records are
X accessed is the ascending order (or optionally under AIX, OS/2, and
X Windows, descending order) of the relative record numbers of all
records that currently exist within the file.
In the random access mode, you control the sequence in which records
are accessed. The desired record is accessed by placing its relative
record number in the RELATIVE KEY data item; the RELATIVE KEY must not
be defined within the record description entry for this file.
In the dynamic access mode, you can change, as necessary, from
sequential access to random access, using the appropriate forms of
input-output statements.
© Copyright IBM Corp. 1991, 1998
IBM Library Server Copyright 1989, 2005 IBM Corporation. All rights reserved.
Return to library:
z/OS |
z/OS.e |
TPF |
z/VSE |
z/VM |
IBM Hardware |
IBM System z Redbooks
Glossary:
IBM terminology
Publications:
How to order publications
Readers:
Download IBM Library Reader |
Download IBM Softcopy Reader |
Download Adobe® Acrobat® Reader®
Library management:
Download IBM Softcopy Librarian
Contacts:
Contact z/OS
Adobe, the Adobe logo, Acrobat, the Acrobat logo, and Acrobat Reader are registered trademarks
of Adobe Systems incorporated.