Author |
Message
|
anveshita |
Posted: Mon Dec 27, 2004 12:12 pm Post subject: Bitwise OR operation |
|
|
Master
Joined: 27 Sep 2004 Posts: 254 Location: Jambudweepam
|
I see a code sample in JAVA that says
getmessageoptions.options=8225;
I am trying to understand how I can represent this in more readable format. Probably the sample I am looking at, is a decompiled version.
I understand that multiple options are defined you could do a bitwise OR operation and sepecify the options as single integer.
Given the above option, how do I know what options the sample code is specifying.
Please let me know |
|
Back to top |
|
 |
kirani |
Posted: Mon Dec 27, 2004 12:18 pm Post subject: |
|
|
Jedi Knight
Joined: 05 Sep 2001 Posts: 3779 Location: Torrance, CA, USA
|
All MQ Constants and their Hex/decimal values are documented in Appendix B of Application Programming Reference manual. You need to do some maths to find out what options would correspond to 8225. Look at MQGMO_* options. _________________ Kiran
IBM Cert. Solution Designer & System Administrator - WBIMB V5
IBM Cert. Solutions Expert - WMQI
IBM Cert. Specialist - WMQI, MQSeries
IBM Cert. Developer - MQSeries
|
|
Back to top |
|
 |
anveshita |
Posted: Mon Dec 27, 2004 1:27 pm Post subject: |
|
|
Master
Joined: 27 Sep 2004 Posts: 254 Location: Jambudweepam
|
Thanks Kirani,
If I am correct it amouts to
MQGMO_FAIL_IF_QUIESCING:8192
MQGMO_BROWSE_NEXT:32
MQGMO_WAIT:1
Ain't it?
Thanks |
|
Back to top |
|
 |
kirani |
Posted: Mon Dec 27, 2004 2:42 pm Post subject: |
|
|
Jedi Knight
Joined: 05 Sep 2001 Posts: 3779 Location: Torrance, CA, USA
|
that's correct!
The person who wrote the sample code should have used MQ Constants to make it more redable. _________________ Kiran
IBM Cert. Solution Designer & System Administrator - WBIMB V5
IBM Cert. Solutions Expert - WMQI
IBM Cert. Specialist - WMQI, MQSeries
IBM Cert. Developer - MQSeries
|
|
Back to top |
|
 |
bower5932 |
Posted: Mon Dec 27, 2004 2:45 pm Post subject: |
|
|
 Jedi Knight
Joined: 27 Aug 2001 Posts: 3023 Location: Dallas, TX, USA
|
Where did you find the sample? |
|
Back to top |
|
 |
clindsey |
Posted: Mon Dec 27, 2004 2:46 pm Post subject: |
|
|
Knight
Joined: 12 Jul 2002 Posts: 586 Location: Dallas, Tx
|
You are correct
I personally believe it is easier to work with the number is hex.
8225 = 0x2021.
this is:
MQGMO_FAIL_IF_QUIESCING 0x00002000
+
MQGMO_BROWSE_NEXT 0x00000020
+
MQGMO_WAIT 0x00000001
Charlie |
|
Back to top |
|
 |
|