Using bit operations

If the programming language supports bit operations, perform the following steps:

  1. Select one of the following values, according to the type of report to be checked: Call the value A.

    On z/OS, use the MQRO_*_WITH_DATA values instead of the MQRO_*_WITH_FULL_DATA values.

  2. Combine the Report field with A using the bitwise AND operation; call the result B.
  3. Test B for equality with each value that is possible for that type of report.

    For example, if A is MQRO_EXCEPTION_WITH_FULL_DATA, test B for equality with each of the following to determine what was specified by the sender of the message:

    The tests can be performed in whatever order is most convenient for the application logic.

Use a similar method to test for the MQRO_PASS_MSG_ID or MQRO_PASS_CORREL_ID options; select as the value A whichever of these two constants is appropriate, and then proceed as described above.