|  | 
 | ||||
|        | |||||
|  | ||||||
| Related Syntax | Other Library Functions | |||||
| function | mq-inquire-names | 
| Library: MQSeries access (OMMQI) legacy Include: ommqi.xin | 
define external function mq-inquire-names object value mq-object object names modifiable stream namelist
Argument definitions
Use mq-inquire-names to inquire about the names of the currently connected queue namelist.
 You must include the following line at the beginning of your OmniMark
program:
include "ommqi.xin"
The MQSeries queue represented by object must be open (else external exception OMMQI0013).
This function provides the namelist inquire functionality provided by calling MQINQ with the MQCA_NAMES selector value. See the IBM MQSeries documentation for MQINQ for more information.
The Hconn parameter in the IBM MQSeries C interface is not part of the OmniMark MQSeries interface as it is tracked by the object parameter.
This function only works when the previous mq-open call was on a queue namelist, that means that the open was using an object type of MQOT_NAMELIST.
The CompCode and Reason parameters of MQINQ are integrated into the OMMQI error handling.
 Inquire and output the current names in a namelist
     local mq-connection       a-connection
     local mq-object               a-object
     local stream                 od-fields      variable
     local mq-object-descriptor   a-mqod
     local stream                 namelist-names variable
  
     ; connect to the queue manager "QM_default"
     set a-connection to mq-connect to "QM_default"
  
     ; Set the object type to MQOT_NAMELIST and name to "test-namelist"
     set new od-fields {"ObjectName"} to "test_namelist"
     set new od-fields {"ObjectType"} to MQOT_NAMELIST_STR
     mq-set-object-descriptor a-mqod to od-fields
  
     ; open the namelist
     set a-object to mq-open connection a-connection
            object-descriptor a-mqod
            options (MQOO_INQUIRE)
  
     ; Inquire about the names in the namelist
     mq-inquire-names object a-object
                names  namelist-names
  
     output "Names in namelist%n"
     repeat over namelist-names
        output namelist-names || "%n"
     again
| Related Syntax mq-set mq-inquire | Other Library Functions mq-backout mq-close mq-commit mq-connect mq-connection mq-connectx mq-disconnect mq-get mq-get-entire-return-status mq-get-function-status mq-get-logging-level mq-get-throw-on-warnings mq-inquire mq-inquire-names mq-object mq-open mq-put mq-put1message mq-set mq-set-logging-level mq-set-throw-on-warnings | 
Copyright © Stilo International plc, 1988-2008.