MQeTrace

Description
Writes a string to the WebSphere MQ Everyplace trace facility. The size of the string character MQETCHAR and the destination of the trace output is platform dependent. On PalmOS, the string character is a single byte and the trace is written to a standard MemoPad database and can be viewed by calling the MemoPad application. For code portability, it is recommended that the trace string be wrapped in an MQTS() macro.

Syntax
#include <hmq.h> 
MQEVOID MQeTrace ( MQEHSESS hSess, MQETCHAR * pTStr);

Parameters

MQEHSESS hSess - input
The session handle returned by MQeInitialize.

MQETCHAR pTStr - input
A null terminated trace string.

Return Value
None.

Example
#include <hmq.h>
MQHSESS hSess;
MQEINT32  compcode;
MQEINT32  reason;
 
hSess = MQeInitialize("MyAppsName", &compcode, &reason );
 
/* Start the trace */
MQeTraceCmd ( hSess, MQE_TRACE_CMD_START, 0, &compcode, &reason);
MQeTraceCmd ( hSess, MQE_TRACE_CMD_SET_MASK, 
              MQE_TRACE_OPTION_SYS_ERROR | MQE_TRACE_OPTION_APP_MSG, 
             &compcode, &reason );
 
MQeTrace( hSess, MQTS(" Starting MQe..."));
MQeTrace( hSess, MQTS("IThis is a information trace msg."));
 
/* Stop the trace */
MQeTraceCmd ( hSess, MQE_TRACE_CMD_STOP, 0, &compcode, &reason  );
 
/* Terminate the MQe session */
MQeTerminate( hSess, &compcode, &reason);
 

See Also
MQeTraceCmd



© IBM Corporation 2002. All Rights Reserved