MQeFieldsPutBoolean

Description
Puts a boolean value into an MQeFields object.

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

Parameters

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

MQEHFIELDS hFlds - input
A handle to an MQeFields object.

MQECHAR * pName - input
A null terminated string containing the name of the field. A null or a zero length string is invalid.

MQEBYTE aBool - input
A boolean value

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
Field name not found.

MQE_EXCEPT_INVALID_HANDLE

Return Value

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

Example
#include <hmq.h>
#include <hmqHelper.h>
static MQECHAR const * FieldsType 
				= "com.ibm.mqe.MQeFields";
static const MQECHAR * textVal = 
			"The Owl and the Pussy Cat went to sea";
MQEHSESS  hSess;
MQEINT32  compcode;
MQEINT32  reason;
MQEHFIELDS hFlds;
MQBOOL   aBool;
MQEBYTE * pData;
MQEINT32  rc;
 
hSess  = MQeInitialize("MyAppsName", 
								&compcode, &reason);
hFlds  = MQeFieldsAlloc( hSess, FieldsType, 
									&compcode, &reason);
aBool  = 1;
MQeFieldsPutBoolean( hSess, hFlds, 
								"ibm", aBool, 
								&compcode, &reason); 

See Also


© IBM Corporation 2002. All Rights Reserved