MQeFieldsDelete

Description
Delete a field in the MQeFields object.

Given a field name, remove its associated field from the MQeFields object.

Syntax
#include <hmq.h>
MQEINT32 MQeFieldsDelete( MQEHSESS hSess,
										MQEHFIELDS hFlds, 
										MQECHAR * pName, 
            						MQEINT32 * pCompCode, 
										MQEINT32 * pReason)

Parameters

MQEHSESS hSess - input
The session handle, returned by MQeInitialize.

MQEHFIELDS hFlds - input
Handle to an MQeFields object.

MQECHAR * pName - input
Null terminated string name of the field. A null or a zero length string is not valid.

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_NOT_FOUND

The field was not found in the MQeFields object.

MQE_EXCEPT_INVALID_HANDLE

Return Value

MQEINT32
Returns '0' on success, or '-1' on failure.

Example
#include <hmq.h>
static MQECHAR const * FieldsType = "com.ibm.mqe.MQeFields";
MQEHSESS  hSess;
MQEINT32  compcode;
MQEINT32  reason;
MQEHFIELDS hFlds;
MQEINT32  rc;
 
hSess  = MQeInitialize("MyAppsName", 
									&compcode, &reason);
hFlds  = MQeFieldsAlloc( hSess, FieldsType, 
									&compcode, &reason);
 
/*
 * Add some fields to the fields object... 
		and one of them is "XYZ"
 */
 ...
 
/*
 * Now delete field named "XYZ"
 */
rc = MQeFieldsDelete( hSess, hFlds, "XYZ", 
								&compcode, &reason);
 

See Also
MQeFieldsPut



© IBM Corporation 2002. All Rights Reserved