Using a Buffer

In the previous two examples, BUFFER=(BUFF) specifies the address of a storage area where CMS stores information. You can use the CQYSECT macro to map this area. If the buffer length is less than the length of CQYSECT, the data in the buffer is truncated. CONSOLE QUERY stores into register 0 the length of data it actually moves into the buffer. CQYSECT provides length values you can use to specify the size of the buffer. For more information on the CQYSECT macro, see z/VM: CMS Macros and Functions Reference.

A CONSOLE OPEN and CONSOLE QUERY DEVICE will obtain new device information and update a device entry for that device if one already exists. A CONSOLE QUERY, however, will extract whatever information is in the path and device entries. This will reflect the state of the path and associated device either when the path was opened or at the time of the last I/O if I/O was performed for that path. This also avoids the overhead of DIAGNOSE instructions when CONSOLE QUERY PATH is issued from exit routines driven by the I/O first level interrupt handler. Therefore, when disconnecting and reconnecting to another device, there is a possibility the original device information will be returned when a CONSOLE QUERY PATH is done.