Posted: Wed Jul 17, 2002 5:24 am Post subject: How control MQSeries options coded whithin a program
Newbie
Joined: 11 Jun 2002 Posts: 5 Location: PARIS (FRANCE)
Building up an MQSeries API in C:
- the API receive information from the application and specially the Put options for example coded in a special field
- some of these options are not allowed for the application
question: among all the options coded (values are added) in that field how can the API identify the values not allowed? - remind us that the fields in which the options are coded is MQLONG type ???
Joined: 22 May 2002 Posts: 268 Location: NIMCONSULT - Belgium
The different put options correspond to specific positions of bits in the MQLONG. Adding them is equivalent to a logical "OR" operation on the bits positions. Look in the MQ Series header files, you will see that the MQPMO_* values are powers of 2.
In the API implementation, you can easily test which option has been selected. Example:
if (mqpmo & MQPMO_SYNCPOINT)
{
// the MQPMO_SYNCPOINT option has been selected
}
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