Table 1 and Table 2 summarize the possible values and the information returned for a GQSCAN request.
GQSCAN Invocation | TOKEN Parameter Coded? | Information Returned |
---|---|---|
Initial call | No | At least the first RIB that represents the first
requestor on the resource queue, and as many of that RIB's associated
RIBEs as will fit. Any RIBEs that do not fit are not returned to
the caller. If all of the RIBEs fit, GQSCAN returns the next RIB on the resource queue, as long as the remaining area is large enough to hold that RIB and at least one of its RIBEs. |
Initial call | Yes; value is zero | At least the first RIB that represents the first
requestor on the resource queue, and as many of that RIB's associated
RIBEs as will fit. Any RIBEs that do not fit are not returned to
the caller. If all of the RIBEs fit, GQSCAN returns the next RIB on the resource queue, as long as the remaining area is large enough to hold that RIB and all of its RIBEs. |
Subsequent call | No | At least the first RIB that represents the first
requestor on the resource queue, and as many of that RIB's associated
RIBEs as will fit. Any RIBEs that do not fit are not returned to
the caller. If all of the RIBEs fit, GQSCAN returns the next RIB on the resource queue, as long as the remaining area is large enough to hold that RIB and at least one of its RIBEs. |
Subsequent call | Yes; value is the token value returned by GQSCAN on the preceding call | At least the next RIB on the resource queue,
with as many of that RIB's associated RIBEs as will fit. Any RIBEs
that do not fit are not returned to the caller. If all of the RIBEs fit, GQSCAN returns the next RIB on the resource queue, as long as the remaining area is large enough to hold that RIB and all of its RIBEs. |
Note that, because the specified area is not large enough, the caller cannot receive all of the RIBEs associated with resource B, even though the caller coded the TOKEN parameter. To receive all of those RIBEs, the caller has to specify a larger area and reissue the GQSCAN request. Authorized callers (those who can specify SCOPE=LOCAL or SCOPE=GLOBAL) do not need to alter the size of the area they provide, as long as they specify the TOKEN parameter; they can receive additional RIBEs on subsequent calls to GQSCAN.
GQSCAN Invocation | TOKEN Parameter Coded? | Information Returned |
---|---|---|
Initial call | No | At least the first RIB that represents the first
requestor on the resource queue, and as many of that RIB's associated
RIBEs as will fit. Any RIBEs that do not fit are not returned to
the caller. If all of the RIBEs fit, GQSCAN returns the next RIB on the resource queue, as long as the remaining area is large enough to hold that RIB and at least one of its RIBEs. |
Initial call | Yes; value is zero | At least the first RIB that represents the first
requestor on the resource queue, and as many of that RIB's associated
RIBEs as will fit. Any RIBEs that do not fit are not returned unless
you issue GQSCAN again, with the TOKEN parameter equal to the value
that GQSCAN returns on this call. If all of the RIBEs fit, GQSCAN returns the next RIB on the resource queue, as long as the remaining area is large enough to hold that RIB and at least one of its RIBEs. |
Subsequent call | No | At least the first RIB that represents the first
requestor on the resource queue, and as many of that RIB's associated
RIBEs as will fit. Any RIBEs that do not fit are not returned to
the caller. If all of the RIBEs fit, GQSCAN returns the next RIB on the resource queue, as long as the remaining area is large enough to hold that RIB and at least one of its RIBEs. |
Subsequent call | Yes; value is the token value returned by GQSCAN on the preceding call | If GQSCAN was unable to return all of the RIBEs
for the last RIB returned on the preceding call, the information returned
is that last RIB and its remaining RIBEs, plus any additional RIBs
and their associated RIBEs as will fit. Otherwise, GQSCAN returns at least the next RIB on the resource queue and as many of that RIB's associated RIBEs as will fit. |
When scanning the information returned, you must use the size of the fixed portion of the RIB and the RIBE that is returned in register 0. The size of the fixed portion of the RIB (RIBLEN) is in the high-order half of register 0, and the size of the RIBE (RIBELEN) is in the low-order half.
The first RIB starts at the beginning of the workarea you specify on the AREA parameter. To find the first RIBE, add the value of RIBLEN and the variable portion of RIB (as found in the RIBVLEN field of the RIB) to the address of the workarea. To find the second RIBE, add the value of RIBELEN to the address of the first RIBE.
RIBLEN + RIBVLEN + (the number of RIBEs x RIBELEN)