MQeFieldsHndl hReturnedMessage; display("Getting the message back \n"); rc = mqeQueueManager_getMessage(hQueueManager, &exceptBlock, &hReturnedMessage, hLocalQMName, hLocalQueueName, NULL, NULL, 0); }Once the message has been obtained, you can check it for the value that was entered. Obtain this by using the getInt32 function. If the result is valid, you can print it out:
if (MQERETURN_OK == rc) { MQEINT32 answer; rc = mqeFields_getInt32(hReturnedMessage, &exceptBlock, &answer, hFieldLabel); if (MQERETURN_OK == rc) { display("Answer is %d\n",answer); } else { display("\n\n %s (0x%X) %s (0x%X)\n", mapReturnCodeName(EC(&exceptBlock)), EC(&exceptBlock), mapReasonCodeName(ERC(&exceptBlock)), ERC(&exceptBlock) ); } }
Parent topic: Developing the C application