* from cmcq.h #define MQOO_INPUT_AS_Q_DEF 0x00000001 #define MQOO_INPUT_SHARED 0x00000002 #define MQOO_INPUT_EXCLUSIVE 0x00000004 #define MQOO_BROWSE 0x00000008 #define MQOO_OUTPUT 0x00000010 #define MQOO_INQUIRE 0x00000020 DEFINE CLASS mq AS Custom MQSession = NULL QM = NULL ResponseQ = NULL DIMENSION BrowseInfo[1,5] FUNCTION Init WITH this .MQSession = CREATEOBJECT("mqax200.mqsession") .QM = .MQSession.AccessQueueManager("YourQueueManagerName") .ResponseQ = .QM.AccessQueue("YourQueueName",MQOO_INQUIRE+MQOO_INPUT_AS_Q_DEF) ENDWITH ENDFUNC ************** * Read/Destroy ************** FUNCTION Read LPARAMETERS tcID IF NOT EMPTY(tcID) LOCAL oGetMsg, oGetOptions oGetMsg = this.MQSession.AccessMessage() oGetOptions = this.MQSession.AccessGetMessageOptions() * * Set the ID to retrieve * oGetMsg.MessageId = tcID * * Get the message * this.ResponseQ.Get(oGetMsg,oGetOptions) this.QM.Commit() ENDIF ENDFUNC ENDDEFINE