HOME

TheInfoList



OR:

In
IBM mainframe IBM mainframes are large computer systems produced by IBM since 1952. During the 1960s and 1970s, IBM dominated the computer market with the 7000 series and the later System/360, followed by the System/370. Current mainframe computers in IBM' ...
operating system An operating system (OS) is system software that manages computer hardware and software resources, and provides common daemon (computing), services for computer programs. Time-sharing operating systems scheduler (computing), schedule tasks for ...
s, Basic sequential access method (BSAM) is an
access method An access method is a function of a mainframe computer, mainframe operating system that enables access to data on disk, tape or other external devices. Access methods were present in several mainframe operating systems since the late 1950s, under ...
to read and write
dataset A data set (or dataset) is a collection of data. In the case of tabular data, a data set corresponds to one or more database tables, where every column of a table represents a particular variable, and each row corresponds to a given record o ...
s sequentially. BSAM is available on
OS/360 OS/360, officially known as IBM System/360 Operating System, is a discontinued batch processing operating system developed by IBM for their then-new System/360 mainframe computer, announced in 1964; it was influenced by the earlier IBSYS/IBJOB a ...
, OS/VS2, MVS,
z/OS z/OS is a 64-bit operating system for IBM z/Architecture mainframes, introduced by IBM in October 2000. It derives from and is the successor to OS/390, which in turn was preceded by a string of MVS versions.Starting with the earliest: ...
, and related operating systems. BSAM is used for devices that are naturally sequential, such as
punched card A punched card (also punch card or punched-card) is a stiff paper-based medium used to store digital information via the presence or absence of holes in predefined positions. Developed over the 18th to 20th centuries, punched cards were widel ...
readers, punches,
line printer A line printer Printer (computing), prints one entire line of text before advancing to another line. Most early line printers were printer (computing)#Impact printers, impact printers. Line printers are mostly associated with unit record eq ...
s, and
magnetic tape Magnetic tape is a medium for magnetic storage made of a thin, magnetizable coating on a long, narrow strip of plastic film. It was developed in Germany in 1928, based on the earlier magnetic wire recording from Denmark. Devices that use magnetic ...
. It is also used 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 An application programming interface (API) is a connection between computers or between computer programs. It is a type of software interface, offering a service to other pieces of software. A document or standard that describes how to build ...
calls are used for different devices. BSAM allows programs to read and write physical blocks of data, as opposed to the more powerful but less flexible Queued Sequential Access Method (QSAM) which allows programs to access logical records within physical blocks of data. The BSAM user must be aware of the possibility of encountering short (truncated) blocks (blocks within a dataset which are shorter than the BLKSIZE of the dataset), particularly at the end of a dataset, but also in many cases within a dataset. QSAM has none of these limitations.


Application program interface

The programmer specifies DSORG=PS in his Data Control Block (DCB) to indicate use of BSAM. As a ''basic'' access method BSAM reads and writes member data in blocks and the I/O operation proceeds asynchronously and must be tested for completion using the CHECK macro. BSAM uses the standard system macros OPEN, CLOSE, READ, WRITE,and CHECK. The NOTE macro instruction returns position of the last block read or written, and the POINT macro will reposition to the location identified by a previous NOTE. If the dataset is unblocked, that is, the logical record length (LRECL) is equal to the physical block size (BLKSIZE), BSAM may be utilized to simulate a directly accessed dataset using NOTE and POINT on any supported direct access device type (DEVD=DA), and some primitive applications were designed in this way.


Similar facilities

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 (, ; trademarked as UNIX) is a family of multitasking, multi-user computer operating systems that derive from the original AT&T Unix, whose development started in 1969 at the Bell Labs research center by Ken Thompson, Dennis Ritchie, a ...
and
Windows Windows is a Product lining, product line of Proprietary software, proprietary graphical user interface, graphical operating systems developed and marketed by Microsoft. It is grouped into families and subfamilies that cater to particular sec ...
. POINT provides an analog of ''seek'' or ''lseek'',and ''ftell'' is the equivalent of NOTE.


See also

* Queued Sequential Access Method (QSAM) *
Hierarchical Sequential Access Method The IBM Information Management System (IMS) is a joint hierarchical database and information management system that supports transaction processing. Development began in 1966 to keep track of the bill of materials for the Saturn V rocket of the Ap ...
(HSAM) *
Basic Indexed Sequential Access Method Indexed Sequential Access Method (ISAM) is a method for creating, maintaining, and manipulating computer files of data so that records can be retrieved sequentially or randomly by one or more keys. Indexes of key fields are maintained to achieve ...
(BISAM) * Queued Indexed Sequential Access Method (QISAM) * Hierarchical Indexed Sequential Access Method (HISAM)


References

{{Mainframe I/O access methods IBM mainframe operating systems