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

mq-connectx

 
 

Library: Interfaces, MQSeries access (OMMQI)
Include: ommqi.xin
Return type: mq-queue-manager
Returns: 

An initialized mq-connection object connected to the specified queue manager.


Declaration

  define external mq-connection function mq-connectx
      to                   value       stream                queue-manager-name
      connection-options   value       mq-connection-options options

Argument definitions

queue-manager-name
is the name of the queue manager to be accessed.
options
is a configured mq-connection-options object.


Purpose

Use mq-connectx to create a connection to a queue manager.

Requirements

You must include the following line at the beginning of your OmniMark program:

  include "ommqi.xin"

Usage Notes

This function corresponds to the MQCONNX function in the MQSeries API.

The CompCode and Reason parameters of MQCONNX are integrated into the OMMQI error handling.

None of the exit parameters of the MQCD structure (referenced by the mq-connection-options object) are supported

Example

Connect to queue manager "QM_desthost" on machine "desthost.org".

  include "ommqi.xin"

  process
     local mq-connection a-connection
     local mq-connection-options mqcno
     local mq-connection-descriptor mqcd
     local stream mqcno-shelf variable
     local stream mqcd-shelf variable

     ; Initialize connection options to contain a MQCD
     set new mqcno-shelf{"Version"} to "2"
     mq-set-connection-options mqcno to mqcno-shelf

     ; Initialize connection descriptor to point to the default
     ; channel on machine desthost.org
     set new mqcd-shelf{"ChannelName"} to "SYSTEM.DEF.SVRCONN"
     set new mqcd-shelf{"ConnectionName"} to "desthost.org"
     mq-set-connection-descriptor mqcd to mqcd-shelf

     ; Attach connection descriptor to connection options
     mq-set-mqcd-of-mqcno mqcd of mqcno

     ; Connect to queue manager QM_desthost using specified options
     set a-connection to mq-connectx to "QM_desthost" connection-options mqcno

    Related Syntax
   mq-connect
   mq-disconnect
 
  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 ] [ LEGACYLIBRARIES ] [ ERRORS ]

OmniMark 7.1.2 Documentation Generated: June 28, 2005 at 5:45:31 pm
If you have any comments about this section of the documentation, send email to [email protected]

Copyright © Stilo Corporation, 1988-2005.