Basic direct access method

(Redirected fromBDAM)

Basic Direct Access Method,orBDAMis anaccess methodfor IBM'sOS/360 and successorscomputeroperating systemsonSystem/360and latermainframes.BDAM "consists of routines used in retrieving data from, and storing data onto,direct access devices."[1]: p.5 BDAM is available onOS/360,OS/VS2,MVS,z/OS,and related high-end operating systems.

Description

edit

Basic,in IBM terminology, indicates a lower-level access method that deals withdata setsin terms of physicalblocksand does not provide either read-ahead, calledanticipatory buffering,orsynchronization— that is, the user program has to explicitly wait for completion of each input/output event.[2]: p.31 

With BDAM, "the programmer can directly store and retrieve a block by specifying either its actualdevice address,itsrelative positionwithin a data set (relative block number), or therelative trackwithin a data set at which the system is to begin a search.[2]: p.63 

BDAM provides 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 physicalkeysare used, the key of the last record within the block must be written as the key for that block.

The BDAM application program interface can be compared with the interface offered byopen,read,writeandclosecalls (using file handles) in other operating systems such asUnixandWindows.

BDAM is still supported by IBM as of 2012. Because of its dependence on physical device geometry new IBM direct-access devices used with z/OS emulateIBM 3390devices regardless of their real physical characteristics.

Application program interface

edit

The programmer specifiesDSORG=DAin hisData Control Block(DCB) to indicate use of BDAM. Space can be in up to 16extentson eachvolume.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 incontiguoustracks by codingSPACE=(,,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.[3]

As abasicaccess method BDAM reads and writes member data inblocksand the I/O operation proceedsasynchronouslyand must be tested for completion using theCHECKmacro.[4]BDAM uses the standard system macrosOPEN,CLOSE,READ,WRITE,andCHECK.TheREADorWRITEmacro instructionsmust provide the block address or key of the desired record. TheCHECKmacro has to be used to wait for completion of a specific operation before the data can be accessed or thedata bufferreused. It is possible to start multiple input/output operations to run concurrently.

Records in a direct data set can contain user-specifiedrecorded keysof 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.[2]This allows multiple keyshashingto the same track to be handled automatically by the I/O subsystem.

Disk addresses

edit

BDAM accepts disk addresses as either actual device addresses, as relative track addresses, or as relative block numbers.

Device addressesare eight byte fields in the formMBBCCHHR.All subfields are binary numbers.[5]

  • Mis theextent numberfor files with more than oneextent(non-contiguous files).
  • BBis zero. Previously this indicated thebinon anIBM 2321 Data Cell.
  • CCis the absolute cylinder number on the device.
  • HHis the track (head) number.
  • Ris the record number on the track. Record zero contains control information for the track and can not be used.

Specifying device addresses makes the datasetunmovable.[2]: p.106 

Relative track addressesare three byte fields in the formTTR.All subfields are binary numbers.

  • TTis the relative track number in the file, starting with zero.
  • Ris the record number on the track.

Relative block numbersare four byte (fullword) binary numbers indicating the block number in the file. The first block is block 0. This form of addressing can only be used with fixed length blocks (RECFM=F).[6]: p.106 

See also

edit

References

edit
  1. ^IBM System/360 Operating System Basic Direct Access Method Program Logic Manual(PDF).IBM. July 1967. Y28-6617-3.
  2. ^abcdIBM System/360 Operating System Data Management(PDF).IBM. April 1966. C28-6537-1.
  3. ^CICS and BDAM,IBM infocenter
  4. ^IBM Corporation (June 1973).OS Data Management Macro Instructions(PDF).RetrievedAugust 19,2016.
  5. ^IBM Corporation."Executing Direct Access Programs".IBM.
  6. ^OS Data Management Services Guide(PDF).IBM. July 1973. GC26-3746-2.
edit