View previous topic :: View next topic
|
Author |
Message |
aknatva
New User
Joined: 21 May 2009 Posts: 6 Location: hyderabad
|
|
|
|
Hi,
When we want to setup a couple of get message options, the code in the sample programs I got is as follows.
Compute MQGMO-Options = MQGMO_ACCEPT_TRUNC_MSGS +
MQGMO_WAIT
Add MQGMO_CONVERT to MQGMO_OPTIONS
Add MQGMO_SYNCPOINT to MQGMO_OPTIONS
I found in IBM manuals that all the MQGMO options are the integer numbers, which are powers or 2. ( like 2, 4, 8, 16 etc.,)
I am assuming that by adding any of these numbers, we should only get a unique number, and MQ should be able to resolve that unique number into a combination of options
But, the MQGMO_CONVERT is always added separately in all my sample programs. Can any one please explain the reason why MQGMO_CONVERT is added separately. Essentially, COMPUTE & ADD verbs should work similarly. |
|
Back to top |
|
|
dick scherrer
Moderator Emeritus
Joined: 23 Nov 2006 Posts: 19243 Location: Inside the Matrix
|
|
|
|
Hello,
Do not post the same question multiple times.
The duplicate has been removed.
d |
|
Back to top |
|
|
genesis786
Active User
Joined: 28 Sep 2005 Posts: 210 Location: St Katherine's Dock London
|
|
|
|
i think it's not integer, it's binary. if you look at CMQV and CMQGMOV copybooks in %SYS%.MQM.SCSQCOBC you will get some idea.
Code: |
MQGMO-CONVERT PIC S9(9) BINARY VALUE 16384.
|
Code: |
** MQGMO structure
10 MQGMO.
** Structure identifier
15 MQGMO-STRUCID PIC X(4) VALUE 'GMO '.
** Structure version number
15 MQGMO-VERSION PIC S9(9) BINARY VALUE 1.
** Options that control the action of MQGET
15 MQGMO-OPTIONS PIC S9(9) BINARY VALUE 0.
** Wait interval
15 MQGMO-WAITINTERVAL PIC S9(9) BINARY VALUE 0.
** Pointer to signal
15 MQGMO-SIGNAL1 POINTER VALUE NULL.
** Signal identifier
15 MQGMO-SIGNAL2 PIC S9(9) BINARY VALUE 0.
|
and it shouldn't matter whether we add CONVERT separately or at one time. Effectively it is not like adding (mathematically), it's like adding options in a single basket (switching on options) before doing MQGET. |
|
Back to top |
|
|
|