Basic sequential access method
Encyclopedia
In IBM mainframe
IBM mainframe
IBM mainframes are large computer systems produced by IBM from 1952 to the present. During the 1960s and 1970s, the term mainframe computer was almost synonymous with IBM products due to their marketshare...

 operating system
Operating system
An operating system is a set of programs that manage computer hardware resources and provide common services for application software. The operating system is the most important type of system software in a computer system...

s, Basic sequential access method (BSAM) is an access method
Access method
An access method is a function of a mainframe operating system that enables access to data on disk, tape or other external devices. They were introduced in 1963 in IBM OS/360 operating system...

 to read and write dataset
Data set (IBM mainframe)
data set , dataset , is a computer file having a record organization. The term pertains to the IBM mainframe operating system line, starting with OS/360, and is still used by its successors, including the current z/OS. Those systems historically preferred this term over a file...

s sequentially. BSAM is available on OS/360, OS/VS2
OS/VS2
Operating System/Virtual Storage 2 is the successor operating system to OS/360 MVT in the OS/360 family.*SVS refers to OS/VS2 Release 1*MVS refers to OS/VS2 Release 2 and later...

, MVS
MVS
Multiple Virtual Storage, more commonly called MVS, was the most commonly used operating system on the System/370 and System/390 IBM mainframe computers...

, z/OS
Z/OS
z/OS is a 64-bit operating system for mainframe computers, produced by IBM. It derives from and is the successor to OS/390, which in turn followed a string of MVS versions.Starting with earliest:*OS/VS2 Release 2 through Release 3.8...

, and related high-end operating systems.

BSAM is used both for devices that are naturally sequential, such as punched card
Punched card
A punched card, punch card, IBM card, or Hollerith card is a piece of stiff paper that contains digital information represented by the presence or absence of holes in predefined positions...

 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
Application programming interface
An application programming interface is a source code based specification intended to be used as an interface by software components to communicate with each other...

 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
Queued Sequential Access Method
In IBM mainframe operating systems, Queued sequential access method is an access method to read and write datasets sequentially. QSAM is available on OS/360, OS/VS2, MVS, z/OS, and related high-end operating systems....

 (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
Unix
Unix is a multitasking, multi-user computer operating system originally developed in 1969 by a group of AT&T employees at Bell Labs, including Ken Thompson, Dennis Ritchie, Brian Kernighan, Douglas McIlroy, and Joe Ossanna...

 and Windows
Microsoft Windows
Microsoft Windows is a series of operating systems produced by Microsoft.Microsoft introduced an operating environment named Windows on November 20, 1985 as an add-on to MS-DOS in response to the growing interest in graphical user interfaces . Microsoft Windows came to dominate the world's personal...

.

The source of this article is wikipedia, the free encyclopedia.  The text of this article is licensed under the GFDL.
 
x
OK