Home

 

Options using integer constants

Alternatively, an application can specify all its options using a single name/value pair. This might be useful when the presence or absence of an option is conditional upon program logic. In this case, the combined set of options can be specified as a single decimal numeric value. The C header file cmqcfc.h provides corresponding integer constants for all the options. In the previous example, the constants MQREGO_ANONYMOUS and MQREGO_LOCAL are relevant. The anonymous option has a decimal value of 2, and the local option has a decimal value of 4, so the following NameValueString is equivalent:

 MQPSCommand  RegPub
 MQPSRegOpts  6
 MQPSTopic    News


 

Home