IO.QRY - do a low level I/O table lookup.

Usage:

value = io.qry(func [, token, token2]);

Examples:

%b/manif/iotable
  ...
    /* Find the SCT address, and device name for
       the first device on the system */
sct1 = io.qry(_FFSDV);
nam1 = io.qry(_XD2DN, sct1) >> 18;
    /* Find the SCT for logical disk 2,
       physical disk 3, channel 16 of IOM 1 */
devsct = io.qry(_XB2TK, `1-016-`, `03.2  `);
    /* Get the full BCD path from an SCT */
bcd2 = io.qry(_XS2IC | (_FRAQ_ ^^ _FRQ_)<<18, devsct);
bcd1 = .null();   /* First 36 bits */

Where:

func
specifies the exact type of lookup being done. B/MANIF/IOTABLE defines symbolic codes for "func". The upper 18 bits can be used to specify some extra flag values. In particular, the value "(_FRQ_ ^ _FRAQ_) << 18" is used to specify that a 72 bit result is needed.
token
specifies the particular value being looked up. This is usually the 18-bit SCT address identifying the particular device. However, some values of "func" do not need a token, and some require other values, such as a 3-character BCD device name or a BCD "path" name (IOM, channel, device).
token2
is used for values of "func" that require a 72 bit input value (for example, a "path" that is 12 BCD characters long). "token2" specifies the lower 36 bits.
value
is the value of the field being examined. For those cases where the value is more than 36 bits, IO.QRY returns the upper 36 bits in the A register. The value in the A register may be retrieved with a call to .NULL().

Description:

IO.QRY accesses the GCOS8 low level interface that obtains I/O table information.

In TSS, IO.QRY does a DRL T.TBLR. In batch, it calls the .MTBLR interface module directly.

Notes:

In releases SR4500 and later, you must use IO.QRY instead of those methods that accessed .CRSCT, and .CRCT1 directly. IO.QRY is not supported in SR4020 and prior releases.

In most cases, programs will not call IO.QRY directly. Instead, IO.QRY is called by by other SYSLIB routines.

IO.QRY does not directly return a status, since most calls do not require one. However, for those functions that do require that a status be interpreted, it can be obtained by an immediate call to IO.QST.

IO.QRY can not be used to perform .MTBLR update functions, since it always uses the "inquire only" entry point.

See Also:

expl b syslib io.qst

Copyright © 1996, Thinkage Ltd.