An access method defines the technique that is used to store and
retrieve data. Access methods have their own data set structures to organize
data, system-provided programs (or macros) to define data sets, and
utility programs to process data sets.
Access methods are identified primarily by the data set organization. z/OS® users,
for example, use the basic sequential access method (BSAM) or queued sequential
access method (QSAM) with sequential data sets.
There are times when an access method identified with one organization
can be used to process a data set organized in a different manner. For example,
a sequential data set (not extended-format data set) created using BSAM can
be processed by the basic direct access method (BDAM), and vice versa. Another
example is UNIX® files,
which you can process using BSAM, QSAM, basic partitioned access method (BPAM),
or virtual storage access method (VSAM).
Commonly used access methods include the following:
- QSAM
- QSAM (Queued Sequential Access Method) is a heavily used access method.
QSAM arranges records sequentially in the order that they are entered to form
sequential data sets, and anticipates the need for records based on their
order. The system organizes records with other records. To improve performance,
QSAM reads these records into storage before they are requested, a technique
known as queued access.
- BSAM
- BSAM (Basic Sequential Access Method) is used for special cases. BSAM
arranges records sequentially in the order in which they are entered. Unlike
QSAM, however, the user– rather than the system– organizes records with other
records into blocks.
- BDAM
- BDAM (Basic Direct Access Method), which is becoming obsolete, arranges
records in any sequence your program indicates, and retrieves records by actual
or relative address. If you do not know the exact location of a record, you
can specify a point in the data set where a search for the record is to begin.
Data sets organized this way are called direct data sets.
- BPAM
- BPAM (Basic Partitioned Access Method) arranges records as members of
a partitioned data set (PDS) or a partitioned data set extended (PDSE) on
DASD. You can use BPAM to view a UNIX directory and its files as if it were
a PDS. (You can view each PDS, PDSE, or UNIX member sequentially with BSAM or QSAM.)
- VSAM
- VSAM (Virtual Sequential Access Method) is used for more complex applications.
VSAM arranges records by an index key, relative record number, or relative
byte addressing. VSAM is used for direct or sequential processing of fixed-length
and variable-length records on DASD. Data that is organized by VSAM is cataloged
for easy retrieval.