z/OS DFSMSdfp Advanced Services
Previous topic | Next topic | Contents | Contact z/OS | Library | PDF


Executing Direct Access Programs

z/OS DFSMSdfp Advanced Services
SC23-6861-01

The XDAP macro instruction produces the XDAP control block (that is, the ECB, IOB, and channel program) and executes the direct access channel program.

The format of the XDAP macro instruction is:

Read syntax diagramSkip visual syntax diagram
>>-+-------+--XDAP--ecb_symbol--,type--,dcb_addr--,area_addr---->
   '-label-'                                                   

>--,length_value--,-+----------------------------+-------------->
                    '-(key_addr,keylength_value)-'   

>--,blkref_addr--+--------------+--+------------+--------------><
                 '-,sector_addr-'  '-,MF=-+-E-+-'   
                                          '-L-'     

ecb_symbol—symbol or (2-12)
The symbolic name to be assigned to the XDAP event control block. Registers can be used only with MF=E.
type— RI or RK or WI or WK or VI or VK
The type of I/O operation intended for the data set and the method by which blocks of the data set are to be located. One of the combinations shown must be coded in this field. The codes and their meanings are:
Table 1.
Code Meaning
R Read a block.
W Update a block.
V Verify that the device is able to read the contents of a block, but do not transfer data.
I Locate a block by identification. (The key portion, if present, and the data portion of the block are read, updated, or verified.)
K Locate a block by key. (Only the data portion of the block is read, updated, or verified.) If you code this value, code the key_addr,keylength-value operands.
dcb_addr—A-type address or (2-12)
The address of the data control block for the data set.
area_addr—A-type address or (2-12)
The address of an input or output area for a block of the data set.
length_value—absexp or (2-12)
The number of bytes to be transferred to or from the input or output area. If blocks are to be located by identification and the data set contains keys, the value must include the length of the key. The maximum number of bytes transferred is 32 767.
key_addr—RX-type address or (2-12)
When blocks are to be located by key, the address of a virtual storage field that contains the key of the block to be read, updated, or verified.
keylength_value—absexp or (2-12)
When blocks are to be located by key, the length of the key. The maximum length is 255 bytes.
blkref_addr—RX-type address or (2-12)
The address of a field in virtual storage that contains the actual track address of the track containing the block to be located. The actual address of a block is in the form MBBCCHHR, where:

The track address of the block reference (CCHH) may contain 28-bit cylinder numbers for devices with more than 65,520 cylinders. Showing nibbles it is in the form of CCCCcccH, where ccc represent bits 0-11 of the 28-bit cylinder number and CCCC represents bits 12-27 the 28-bit cylinder number. Use the TRKADDR macro to manipulate 16-bit and 28-bit cylinder numbers correctly.

(For more detailed information, see Converting a Relative Track Address to an Actual Track Address.)

sector_addr—RX-type address or (2-12)
The address of a 1-byte field containing a sector value. The sector_addr parameter is used for rotational position sensing (RPS) devices. The parameter is optional, but its use will improve channel performance. When the parameter is coded, a set-sector CCW (using the sector value indicated by the data address field) precedes the search-ID-equal command in the channel program. The sector_addr parameter is ignored if the type parameter is coded as RK, WK, or VK. If a sector address is specified in the execute form of the macro, then a sector address, not necessarily the same, must be specified in the list form. The sector address in the executable form will be used.
Exception: No validity check is made on either the address or the sector value when the XDAP macro is issued. However, a unit check/command reject interruption will occur during channel-program execution if the sector value is not valid for the device or if the sector_addr operand is used when accessing a device without RPS.
MF=
You can use the L-form of the XDAP macro instruction for a macro expansion consisting of a parameter list, or the E-form for a macro expansion consisting of executable instructions.
MF=E
The first operand (ecb_symbol) is required and can be coded as a symbol or supplied in registers 2 through 12. The type, dcb_addr, area_addr, and length_value operands can be supplied in either the L- or E-form. The blkref_addr operand can be supplied in the E-form or moved into the IOBSEEK field of the IOB by your program. The sector_addr is optional; it can be coded either in both the L- and E-form or in neither.
MF=L
The first two operands (ecb_symbol and type) are required and must be coded as symbols. If you choose to code length_value or keylength_value, they must be absolute expressions. Other operands, if coded, must be A-type addresses. (blkref_addr is ignored if coded.)

The XDAP macro builds a channel program containing A-type addresses. These addresses refer to storage within the L-form of the macro. If you copy the L-form of the macro to a work area so that the program can be reentrant, the E-form of the XDAP macro does not update the A-type addresses. This results in an invalid channel program.

The dcb_addr, area_addr, blkref_addr, and sector_value operands can be coded as RX-type addresses or supplied in registers 2 through 12. The length_value and keylength_value operands can be specified as absolute expressions or decimal integers or supplied in registers 2 through 12.

Go to the previous page Go to the next page




Copyright IBM Corporation 1990, 2014