Basic direct access method
Encyclopedia
In IBM mainframe
operating system
s, basic direct access method (BDAM) is an access method
to read and write data set
s directly. In BDAM, the programmer has complete control of the organization of the file. Placement and retrieval is done by directly accessing the block on the device (physical) or within the file extent (relative) BDAM is available on OS/360, OS/VS2
, MVS
, z/OS
, and related high-end operating systems.
BDAM as with BSAM
accesses the entire physical data record, called a block in this context.
BDAM provides organizational assistance in the forms of absolute track address, relative block address and key value, only. There is no index or structure to the file except as programmed by the application. In many applications, a hashing or randomizing function may be used to assign the block address based on a key in the data. If physical keys are used, the key of the last record within the block must be written as the key for that block. Of course, blocks and records within blocks must be written in ascending order of key value.
BDAM requires that the file be allocated with DCB=DSORG=DA (direct access dataset organization) and SPACE= (the file must be of fixed size with contiguous space). The file is opened output and all blocks are written sequentially to preformat the disk and optionally to load the data before the file can be used.
The BDAM 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
. There are also the CHECK, WAIT, and because the BDAM operations are asynchronous. There is also FREEDBUF function that clears the data buffer if it is not re-written
after a read.
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 direct access method (BDAM) 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 data set
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 directly. In BDAM, the programmer has complete control of the organization of the file. Placement and retrieval is done by directly accessing the block on the device (physical) or within the file extent (relative) BDAM 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.
BDAM as with BSAM
Basic sequential access method
In IBM mainframe operating systems, Basic sequential access method 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....
accesses the entire physical data record, called a block in this context.
BDAM provides organizational assistance in the forms of absolute track address, relative block address and key value, only. There is no index or structure to the file except as programmed by the application. In many applications, a hashing or randomizing function may be used to assign the block address based on a key in the data. If physical keys are used, the key of the last record within the block must be written as the key for that block. Of course, blocks and records within blocks must be written in ascending order of key value.
BDAM requires that the file be allocated with DCB=DSORG=DA (direct access dataset organization) and SPACE= (the file must be of fixed size with contiguous space). The file is opened output and all blocks are written sequentially to preformat the disk and optionally to load the data before the file can be used.
The BDAM 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...
. There are also the CHECK, WAIT, and because the BDAM operations are asynchronous. There is also FREEDBUF function that clears the data buffer if it is not re-written
after a read.