swirl
Guide to OmniMark 8   OmniMark home
docs home 
IndexConceptsTasksSyntaxLibrariesLegacy LibrariesErrors
 
  Related Syntax     Other Library Functions  
function  

mq-inquire-names

 
 

Library: MQSeries access (OMMQI) legacy
Include: ommqi.xin

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

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

OmniMark 8.2.0 Documentation Generated: March 13, 2008 at 3:27:39 pm
If you have any comments about this section of the documentation, please use this form.

Copyright © Stilo International plc, 1988-2008.