Previous Topic: OPSENQ Function

Next Topic: ENQ Information Returned in the EDQ

OPSRC and OPSRS Variables

When the C or Q functions of OPSENQ are used with valid syntax, OPSRC and OPSRS variables are created to indicate the success or failure of the function. The OPSRC variable that is generated will contain one of the following values:

0

The function was called properly and at least one matching resource was found and returned in the EDQ. The value returned by the function is a positive integer and represents the number of resources about which information is returned on the EDQ. The value of OPSRS is zero.

4

The function was called properly. However, no resources matched the request. No lines were added to the EDQ and the value returned by the function is zero. The value of OPSRS is zero.

10 or 12

An error occurred while processing the request. OPSRS contains a non-zero value. For more information, see the IBM programming documentation of the GQSCAN service. OPSRC matches the GQSCAN return code and OPSRS matches the GQSCAN reason code.

99

The function was called properly; however, too much data was returned and the EDQ overflowed. The returned value is an integer that indicates the number of resources for which information is returned on the EDQ. Either use the information returned or retry the operation with a larger EDQ. The value of OPSRS is zero.

Note: A syntax error in the function call statement causes an OPS/REXX error and terminates the program. A REXX error 40, Incorrect Call to Routine, is generated.