|  | 
 | ||||
|        | |||||
|  | ||||||
| Related Syntax | Other Library Functions | |||||
| function | mq-set | 
| Library: MQSeries access (OMMQI) legacy Include: ommqi.xin | 
define external function mq-set object value mq-object obj selectors read-only integer selectors integer-vals read-only integer int-shelf optional string-vals read-only stream str-shelf optional
Argument definitions
Use mq-set to set one or more attributes of an opened IBM MQSeries object.
You must include the following line at the beginning of your OmniMark program:
include "ommqi.xin"
The IBM MQSeries object represented by obj must be open (else external exception OMMQI0013).
The selectors shelf must contain at least one value (else external exception OMMQI0020).
The values in the selectors shelf must be valid IBM MQSeries selector identifiers (else external exception OMMQI0018).
If any MQIA_* selectors are specified, then the optional integer-vals argument must be present (else external exception OMMQI0021).
If any MQCA_* selectors are specified, then the optional string-vals argument must be present (else external exception OMMQI0021).
Each item in the str-shelf must not be longer than the maximum length specified by the IBM MQSeries API for the corresponding MQCA_* selector (else external exception OMMQI0022).
This function corresponds with the IBM MQSeries function MQSET. See the IBM MQSeries documentation for MQSET for more information.
The obj parameter maps to both the Hconn and Hobj parameters of MQSET.
The item count for each of the three array parameters to MQSET are not necessary as they are calculated from the corresponding shelves.
The CompCode and Reason parameters of MQSET are integrated into the OMMQI error handling.
Set the access attributes and trigger data of a queue.
     local mq-connection a-connection
     local mq-object               a-object
     local stream                 od-fields           variable
     local mq-object-descriptor   a-mqod
     local integer                selectors           variable
     local integer                int-attribs         variable
     local stream                 stream-attribs      variable
  
     ; Connect to queue manager
     set a-connection to mq-connect to "QM_penguin"
  
     ; Open desired queue
     set new od-fields {"ObjectName"} to "default"
     mq-set-object-descriptor a-mqod to od-fields
     set a-object to mq-open connection a-connection
            object-descriptor a-mqod
            options MQOO_SET
  
     ; Create list of selectors we wish to modify
     set new selectors to MQIA_INHIBIT_GET
     set new selectors to MQIA_INHIBIT_PUT
     set new selectors to MQCA_TRIGGER_DATA
  
     ; Create lists of selector values in same order as selectors
     set new int-attribs to MQQA_GET_INHIBITED
     set new int-attribs to MQQA_PUT_INHIBITED
     set new stream-attribs to "New Trigger Data"
  
     ; Set selector values of the queue
     mq-set object         a-object
            selectors     selectors
            integer-vals  int-attribs
            string-vals   stream-attribs
Copyright © Stilo International plc, 1988-2008.