Starting and terminating a session with the WebSphere MQ Everyplace system

All the 'C' WebSphere MQ Everyplace Queue Manager API and Fields API calls, except the system calls, take a session handle as the first parameter (MQeInitialize returns the session handle). Also, all the APIs take pointers to a Completion code and Reason code as their last two parameters. This allows the APIs to return better diagnostic information than would be available from just a return code. The header file hmq.h contains definitions for possible values returned in the Completion code and the Reason code. Typically, an application tests the Completion code for an error or warning value MQECC_ERROR or MQECC_WARNING and takes appropriate action (which involves testing the Reason code to determine the cause of the problem).



© IBM Corporation 2002. All Rights Reserved