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

mq-close

 
 

Library: Interfaces, MQSeries access (OMMQI)
Include: ommqi.xin

Declaration

  define external function mq-close
    object                value       mq-object     object
    options              value       integer          options

Argument definitions

object
is an open mq-object.
options
is the option to be used while closing the object.


Purpose

Use mq-close to close a connection to an IBM MQSeries object.

Requirements

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

  include "ommqi.xin"

The object must be open (else external exception OMMQI0013).

Usage Notes

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

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

This function is implicitly called when a mq-object variable goes out of scope.

Example

Close an opened queue.

  include "ommqi.xin"

  process
     local mq-connection     a-connection
     local mq-object             a-object
     local stream               od-fields    variable
     local mq-object-descriptor a-mqod

     ; Connect to queue manager QM_desthost
     set a-connection to mq-connect to "QM_desthost"

     ; Set up MQOD structure
     set new od-fields {"ObjectName"} to "default"
     mq-set-object-descriptor a-mqod to od-fields

     ; Open queue
     set a-object to mq-open connection a-connection
            object-descriptor a-mqod
            options (MQOO_OUTPUT union MQOO_INPUT_AS_Q_DEF)

     ; Perform some operations on the queue
     ; ...

     ; Close the queue
     mq-close object a-object options MQCO_NONE

    Related Syntax
   mq-open
 
  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.