Basic direct access method
From Wikipedia, the free encyclopedia
|
In IBM mainframe operating systems, basic direct access method (BDAM) is an access method to read and write data sets 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 only applies to direct access storage. While only disk devices are available today, fixed head disk, drum, data cell, and mass storage system were supported in the past.
BDAM as with BSAM accesses the entire physical data record.
BDAM provides no organizational assistance. There is no index or structure to the file except as programmed by the application. In many applications, a hashing or randomizing function was used to assign the block address based on a key in the data. If a collision occurred, that is, that that particular block was also used by another key, the key was rehashed until a free block was found. When a file was sparsely occupied, every record could be uniquely located. As the file filled, some records required additional attempts to retrieve them adversely affecting the performance of the application.
BDAM requires that the file be allocated with the DSORG=DA (Direct Access dataset organization) and SPACE=(allocationunit,(numberofunits),CONTIG) (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 extent and optionally load the data before the file can be used.[1]
The BDAM application program interface can be compared with the interface offered by open, read, write and close calls (using file handles) in more modern operating systems such as Unix and Windows. There are also the CHECK, WAIT, and because the BDAM operations are asynchronous. There is also FREEBUF function that clears the data buffer if it is not re-written after a read.[2]
- ^ CICS and BDAM, IBM infocenter
- ^ Basic Direct Access MethodPDF (686 KB)