Basic Sequential Access Method

In IBM mainframe operating systems, Basic sequential access method (BSAM) is an access method to read and write datasets sequentially. BSAM is available on OS/360, OS/VS2, MVS, z/OS, and related high-end operating systems.

BSAM is used both for devices that are naturally sequential, such as punched card readers, punches and line printers, and for data on devices that could also be addressed directly, such as magnetic disks. BSAM offers device independence: to the extent possible, the same API calls are used for different devices.

BSAM is—as its name says—basic, in this specific context meaning unbuffered with no deblocking of reads and no blocking of writes, although buffering is an option, but neither deblocking nor blocking. It allows programs to read and write physical blocks of data, as opposed to the more advanced Queued Sequential Access Method (QSAM) which allows programs to access logical records within physical blocks of data.

Indeed, the BSAM user must be aware of truncated final blocks (a block at the end of a dataset which is shorter than the BLKSIZE of the dataset) and, in many cases, embedded truncated blocks (blocks within a dataset which are shorter than the BLKSIZE of the dataset). QSAM has none of these significant limitations. So-called "standard blocks" (blocks being equal to the BLKSIZE) may, in some cases, be forced, but the user must still be prepared for at least the final block being truncated.

If the dataset is unblocked, that is, LRECL is equal to BLKSIZE, BSAM may be utilized to simulate a directly accessed dataset using NOTE (to notify the application of a record's position within the dataset) and POINT (to position the dataset for accessing the record specified by the application, using a value previously supplied by NOTE), on any supported direct access device type (DEVD=DA), and some primitive applications were designed in this way.

The BSAM application program interface can be compared with the interface offered by open, read, write and close calls (using file handles) in other operating systems such as Unix and Windows.

Famous quotes containing the words basic, access and/or method:

    It is a strange fact that freedom and equality, the two basic ideas of democracy, are to some extent contradictory. Logically considered, freedom and equality are mutually exclusive, just as society and the individual are mutually exclusive.
    Thomas Mann (1875–1955)

    Whilst the rights of all as persons are equal, in virtue of their access to reason, their rights in property are very unequal. One man owns his clothes, and another owns a country.
    Ralph Waldo Emerson (1803–1882)

    Women stand related to beautiful nature around us, and the enamoured youth mixes their form with moon and stars, with woods and waters, and the pomp of summer. They heal us of awkwardness by their words and looks. We observe their intellectual influence on the most serious student. They refine and clear his mind: teach him to put a pleasing method into what is dry and difficult.
    Ralph Waldo Emerson (1803–1882)