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


Obtaining the Sector Number of a Block on an RPS Device

z/OS DFSMSdfp Advanced Services
SC23-6861-01

For programs that can be used with both RPS and non-RPS devices, test the UCBRPS bit (bit 3 at offset 17 of the UCB) to determine whether the device has rotational position sensing. If the UCBRPS bit is off, do not issue a channel program with a Set Sector command to the device. The address of the sector conversion routine's entry point is in the CVT0SCR1 field of the CVT.The IBM® DS8000® and newer storage subsystems accept the Set Sector command, but the command has no effect.

Your program can call the conversion routine by issuing a BASR 14,15 or BAS 14,16(,15) instruction. If you are passing the track balance to the routine, invoke the routine using a BAS 14,8(15) or BAS 14,20(,15). If you are computing the sector value on modulo devices with variable length records, pass the track balance to the sector convert routine.

The sector convert routine can be called in 24-bit or 31-bit mode at any of its entry points. When calling in 24-bit mode all addresses must point below the 16MB line.
Note:
  1. The sector convert routine does not support PDSEs or extended format data sets. Using the sector convert routine against a PDSE or extended format data set returns results that are inconsistent with the physical record format.
  2. The sector convert routine does not support data sets that are not DASD or do not have a UCB. Examples include tape, dummy data sets (DD DUMMY), spooled data sets (*, DATA or SYSOUT), TSO terminals and z/OS® UNIX files such as zFS and HFS files. You will receive unpredictable results if you use the conversion routine with a data set or file that is not on DASD or does not have a UCB.

For RPS devices, the conversion routine does all its work in general registers. Load registers 0, 2, 14, and 15 with input to the routine. Register usage is as follows:

Table 1. Registers and Their Use for A Sector Convert Routine
Register Use
0 For fixed, standard blocks or fixed, unblocked records not in a partitioned data set: Register 0 must contain a 4-byte value in the form XXKR, where:
XX
A 2-byte field containing the physical block size
K
A 1-byte field containing the key length
R
A 1-byte field containing the number of the record for which a sector value is desired.

To indicate fixed-length records, turn off (set to 0) the high-order bit of register 0.

Passing the track balance: Register 0 must contain a 4-byte value of the track balance of the record preceding the required record.

For all other cases: Register 0 must contain a 4-byte value in the form BBIR, where:
BB
The total number of key and data bytes on the track up to, but not including, the target record. To indicate variable-length records, turn on (set to 1) the high-order bit of register 0.
I
A 1-byte key indicator (1 for keyed records, 0 for records without keys)
R
A 1-byte field containing the number of the record for which a sector value is desired.
1 Not used by the sector-convert routine.
2 When called at offset 0 or 8, must contain a 4-byte field where:
 
The first byte is the UCB device type code for the device (obtainable from UCB+19)
 
The remaining 3 bytes are the address of a 1-byte area that is to receive the sector value.

If called at offset 16 or 20, must contain the address of a 1-byte area that is to receive the sector value.

3-8 Not used.
9-10 Used by the convert routine and not saved or restored.
11 If called at offset 0 or 8, not used.

If called at offset 16 or 20, contains 1-byte UCBTBYT4 code in the low-order byte. The remaining three bytes must contain zero.

12,13 Not used.
14 Must be loaded with the address in which control is to be returned after execution of the sector conversion routine.
15 Used by the conversion routine as a base register and must be loaded with the address of the entry point to the conversion routine (from field CVT0SCR1 of the CVT).

Go to the previous page Go to the next page




Copyright IBM Corporation 1990, 2014