Basic direct access method

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 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=(,,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 and optionally to 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 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.[2]

References

  1. ^ CICS and BDAM, IBM infocenter
  2. ^ Basic Direct Access MethodPDF (686 KB)