This is usually done via the correlation ID in the message descriptor. When you issue an MQGET if there's data in the correlation ID and/or message ID, these fields are used to identify a matching message. If they are not set, you are asking to get the next message on the queue.

So the requesting half of the transaction would do (in Cobol):

        MOVE MQMI-NONE to MQMD-MSGID.
        MOVE MQCI-NONE to MQMD-CORRELID.
        <do the put, check return code>
        MOVE MQMD-MSGID to MQMD-CORRELID.
        MOVE MQMI-NONE to MQMD-MSGID.
        <do the get, check return code>

And the server half of the transaction would do:

        MOVE MQMI-NONE to MQMD-MSGID.
        MOVE MQCI-NONE to MQMD-CORRELID.
        <do the get, check return code>
        MOVE MQMD-MSGID to MQMD-CORRELID.
        MOVE MQMI-NONE to MQMD-MSGID.
        <do the put, check return code>

The server half is getting the next message off the queue, because both fields are unset. The requesting half gets a message that matches the original message's ID.

MQSeries List <[EMAIL PROTECTED]> wrote on 09/07/2004 07:31:27 AM:

>
> Dear All,
>
> I am sending & receiving  hundred's of messages..How will I know that the
> transaction has picked up the right response message,
>
> What get and put queue options can be used to validate this?
>
> Your answers are appreciated.
>
> Thanks,
>
> [attachment "InterScan_Disclaimer.txt" deleted by Jim Ford/MGIC]
Instructions for managing your mailing list subscription are provided in the Listserv General Users Guide available at http://www.lsoft.com Archive: http://vm.akh-wien.ac.at/MQSeries.archive

Reply via email to