The programmer specifies DSORG=DA in the
Data Control Block (DCB) to indicate use of BDAM. Space can be in up to 16
extents on each
volume. The data set (equivalent to a "file") can reside in up to 255 extents across multiple volumes. If the application has a dependency on the space being on contiguous tracks, you can allocate space for the direct data set in
contiguous tracks by coding SPACE=(,,CONTIG) on the DD statement. Direct data sets must be preformatted before use by opening them as output and writing all the blocks sequentially. This can load all "dummy" records or load initial data. As a
basic access method BDAM reads and writes member data in
blocks and the I/O operation proceeds
asynchronously and must be tested for completion using the CHECK macro. BDAM uses the standard system macros OPEN, CLOSE, READ, WRITE,and CHECK. The READ or WRITE
macro instructions must provide the block address or key of the desired record. The CHECK macro has to be used to wait for completion of a specific operation before the data can be accessed or the
data buffer reused. It is possible to start multiple input/output operations to run concurrently. Records in a direct data set can contain user-specified
recorded keys of up to 255 bytes—all keys in a file must be the same length. Reads and writes can specify a key in addition to a disk address, and BDAM will search starting at the requested block up to the entire area of the file for a record with a matching key. This allows multiple keys
hashing to the same track to be handled automatically by the I/O subsystem. ==Disk addresses==