MQeConfigCreateQMgr

Description
Initialize and create a queue manager on the device.

Syntax
#include <hmq.h>
MQEVOID MQeConfigCreateQMgr ( MQECHAR * pQMgrName, 
										MQEINT32 * pCompCode, 
                          	MQEINT32 * pReason);
 

Parameters

MQECHAR * pQMgrName - input
The name of the local queue manager to be created.

MQEINT32 * pCompCode - output
MQECC_OK, MQECC_WARNING or MQECC_ERROR.

MQEINT32 * pReason - output
If the returned *pCompCode equals MQECC_ERROR, *pReason may have any of the following values:

MQE_EXCEPT_QMGR_ALREADY_EXISTS
An existing queue manager name is defined. Call MQeQMgrGetName to retrieve the current local queue manager name, then call MQeMQeConfigDeleteQMgr to delete the local queue manager, and then call this function again.

Return Value
None.

Example
#include <hmq.h>
MQEHSESS hSess;
MQEINT32  compcode, reason;
MQEINT16  len;
MQECHAR   name[128];
 
hSess     = MQeInitialize( "aSession", &compcode, &reason);
len       = MQeQMgrGetName( hSess, name, 128, 
									&compcode, &reason);
name[len] = '\0';
 
MQeConfigDeleteQMgr( name, &compcode, &reason);
 
MQeConfigCreateQMgr( "MyOwnQMgr", &compcode, &reason);
 
 

See Also


© IBM Corporation 2002. All Rights Reserved