|  | 
 | ||||
|  | ||||||
| Related Topics | Other Library Functions | |||||
| function | mq-connectx | 
| Return type: mq-queue-manager Returns: An initialized mq-connection object connected to the specified queue manager. | 
define external mq-connection function mq-connectx
    to                   value       stream                queue-manager-name
    connection-options   value       mq-connection-options options
Argument definitions
Use mq-connectx to create a connection to a queue manager.
You must include the following line at the beginning of your OmniMark program:
include "ommqi.xin"
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
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 Topics | Other Library Functions | 
Copyright © Stilo International plc, 1988-2010.