Need to send a message to the another application with MsgId and CorrelId , this message require a response. Below option was used in cobol code
MOVE MQMT-REQUEST TO MQMD-TYPE
MOVE MQMI-NONE TO MQMD-MSD-ID
MOVE MQCI-NONE TO MQMD-CORRELID
After writing the the data thru MQPUT/MQPUT1, we need to retrieve the corresponding response from Reply MQ. If we use below option, how program knows this a reponse for the earlier message sent.
MOVE MQMI-NONE TO MQMD-MSGID.
MOVE MQCI-NONE TO MQMD-CORRELID.
CALL 'MQGET' USING MQ-HCONN
how source system know the MsgId and CorrelId for the each message sent to destination application ? because source system must know the MsgId and CorrelId to read the corresponding response from Reply MQ
This was the code written to send a message to another application.
MOVE WS-QUEUE-ALIAS TO MQOD-OBJECTNAME.
MOVE WS-REPLY-QUEUE-ALIAS TO MQMD-REPLYTOQ
MOVE SPACES TO MQMD-REPLYTOQMGR
MOVE MQMT-REQUEST TO MQMD-MSGTYPE
MOVE MQMI-NONE TO MQMD-MSGID
MOVE MQMI-NONE TO MQMD-CORRELID
MOVE MQPER-PERSISTENT TO MQMD-PERSISTENCE.