swirl
Guide to OmniMark 9   OmniMark home
docs home 
 
  Related Topics   Other Library Functions  
function  

mq-inquire-names

 
 


Declaration

define external function mq-inquire-names
  object                value            mq-object             object
  names                modifiable       stream               namelist

Argument definitions

object
is an IBM MQSeries mq-object representing a previously opened queue namelist.
namelist
is a modifiable stream shelf that will contain all the names contained in the currently connected namelist.


Purpose

Use mq-inquire-names to inquire about the names of the currently connected queue namelist.

Requirements

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).

Usage Notes

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.

Example

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 Topics
 
Other Library Functions
 
 

Top [ INDEX ] [ CONCEPTS ] [ TASKS ] [ SYNTAX ] [ LIBRARIES ] [ LEGACY LIBRARIES ] [ ERRORS ]

OmniMark 9.1.0 Documentation Generated: September 2, 2010 at 1:38:10 pm
If you have any comments about this section of the documentation, please use this form.

Copyright © Stilo International plc, 1988-2010.