Converting a Relative Track Address to an Actual Track Address
Convert a relative track address to the actual address by using a resident system conversion routine that can be called in 24 or 31 bit mode.
The conversion routine has two entry points. One, at the address
in the CVTPCNVT field of the communication vector table (CVT), is
intended for data sets with up to 65535 tracks. The other, at offset
+12 from the address in CVTPCNVT, is intended for any data set. Call
the conversion routine with one of the following instructions:
- BALR 14,15 Call +0 entry point for track conversion
- BASR 14,15 Call +0 entry point for track conversion
- BAL 14,12(,15) Call +12 entry point for track conversion
- BAS 14,12(,15) Call +12 entry point for track conversion
The address of the CVT is in storage location 16 (field FLCCVT of the PSA data area, mapped by macro IHAPSA).
The conversion routine does all its work in general registers. Load registers 0, 1, 2, 14, and 15 with input to the routine. Register usage is as follows:
| Register | Use |
|---|---|
| 0 | Must be loaded with a 4-byte value of the relative track number.
If entered at CVTPCNVT+0, this value must be in the form TTRn,
where:
If entered at CVTPCNVT+12, this value must
be in the form TTTR, where:
|
| 1 | Must be loaded with the address of the data extent block (DEB) of the data set. Each DEB resides below 16 MB. When you call the +0 entry point, the called routine clears the high order byte of this register. When you call the +12 entry point, this byte must contain X'00'. Note that if the DEB31UCB bit is zero, the UCB address field is three bytes in DEBUCBA. If the DEB31UCB bit is one, the UCB address field is four bytes in DEBUCBAD. |
| 2 | Must be loaded with the address of an 8-byte area that is to
receive the actual address of the block to be processed. The converted
address is of the form MBBCCHHR, where:
|
| 3–8 | Not used by the conversion routine. |
| 9–12 | Used by the conversion routine and not restored. |
| 13 | Used by the conversion routine and not restored.
If you call the +12 entry point, the high order three bytes must contain
zero and the low order byte must be as set as follows:
|
| 14 | Must be loaded with the address to which control is to be returned after execution of the conversion routine. |
| 15 | Used by the conversion routine as a base register and must be loaded with the address where the conversion routine is to receive control (from field CVTPCNVT of the CVT). |