Execute Direct Access Program
In IBM mainframe operating systems, Execute Direct Access Program (XDAP) is a pseudo access method for accessing direct access data sets on a record by record basis.
Existing records may be read or updated. The dataset may not be extended using XDAP; for that purpose BDAM or BPAM is required. XDAP may coexist with BDAM or BPAM, and several OS components are implemented in this way.
The programmer is responsible for computing the full direct access record address, MBBCCHHR. System algorithms are available for calculating the MBBRRHHR from a TTRN. Additional system algorithms are available for calculating the TTRN from a record number.
List and Execute forms of XDAP are provided, whereby a prototype form, called the List Form, is coded as data, and a functional form, called the Execute Form, is coded as instructions. XDAP is also provided in a conventional form, in which case the two forms are combined.
XDAP results in an SVC 0 instruction, the EXCP supervisor call, being executed, hence EXCP is implicitly embedded within XDAP. The IOB, which is the parameter to EXCP, is included within the XDAP macro expansion.
XDAP must reference an OPENed DCB and a full direct access record address. The DCB may be OPENed for input, for output or for input/output, but all outputs must be update writes of existing records as XDAP does not support format writes. BSAM and BPAM are available for executing format writes (writes which add new records to the dataset).