|
RSS Feed - WebSphere MQ Support
|
RSS Feed - Message Broker Support
|
 |
|
Report Options - How to test for? |
« View previous topic :: View next topic » |
Author |
Message
|
PeterPotkay |
Posted: Fri Jun 01, 2001 12:12 pm Post subject: |
|
|
 Poobah
Joined: 15 May 2001 Posts: 7722
|
I am coding a replying application and am including logic to determine which combination of the following four report options were set by the requestor: MQRO_PASS_MSG_ID, MQRO_PASS_CORREL_ID, PAN and/or NAN.
I found the instructions at IBM's Application Programming Reference manual on how to determine whether the MSG_ID or CORREL_ID options were set, regardless of what other Reports may have been requested, and that logic is testing out fine.
My question is regarding PAN and NAN reports. The site does not give any instructions on how to determine if these 2 options were set amongst the other report options. (Using the same psuedo logic that they provide for checking for Exception and/or Expiration reports does not work.)
Anyone know how to check for these 2 values?
_________________ Peter Potkay
Keep Calm and MQ On |
|
Back to top |
|
 |
kolban |
Posted: Sat Jun 02, 2001 9:40 am Post subject: |
|
|
 Grand Master
Joined: 22 May 2001 Posts: 1072 Location: Fort Worth, TX, USA
|
When the message is received from the sending application, the received MQMD header will contain the "Report" field. This is a bitwise field where if a bit is set in the field, it has a special meaning. IBM supplies constants for the bits. If the bit corresponding to:
MQRO_PAN is set then a positive acknowledgement is requested.
MQRO_NAN is set then a negative acknowledgement is requested.
It is the repsonsibility of the receiving application to honor (or not) the semantics of these "requested" semantics.
To test if these bits are set, in C you could code the following:
MQMD myMD;
...
MQGET(..., &myMD, ...)
...
if ((myMD.Format & MQRO_PAN) != 0)
{
... process PAN
}
if ((myMD.Format & MQRO_NAN) != 0)
{
... process NAN
}
Hope this helps ... Neil |
|
Back to top |
|
 |
PeterPotkay |
Posted: Tue Jun 12, 2001 4:41 am Post subject: |
|
|
 Poobah
Joined: 15 May 2001 Posts: 7722
|
I need to code the routine in COBOL.
IF ((MQMD-REPORT / MQRO-XXX) / 2 * 2) = (MQMD-REPORT / MQRO-XXX)
THEN MQRO-XXX IS NOT USED
ELSE MQRO-XXX IS USED
Larry McCord was kind enough to supply me with the above code. It works perfectly for all of the report options.
_________________ Peter Potkay
Keep Calm and MQ On |
|
Back to top |
|
 |
|
|
 |
|
Page 1 of 1 |
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
|
|
|