MQ

 View Only
  • 1.  MQ RFH2

    Posted Mon April 29, 2024 12:00 PM

    Hi!

    I need a RFH2 header to my MQPUT in RPG 

         CALLP MQPUT(HCONN : HOBJ : MQMD : MQPMO : BUFLEN : BUFPTR
                            : CCODE : REASON);

    Where should the RFH2 header be in? MQMD? MQPMO Or both? I've been todl it can't be in the "payload" 

    RFH2 Header: <usr><TargetNodeId>qa-node</TargetNodeId></usr>

    Do you have a RPG code example for this? it would be much appreciated! 

    Allt the best!
    Björn 



    ------------------------------
    Björn Ljunggren
    ------------------------------


  • 2.  RE: MQ RFH2

    Posted Mon April 29, 2024 12:18 PM

    Don't use an RFH2 - although it's possible, it can be  hard to manipulate. You can see https://marketaylor.synology.me/?p=1335 for a C example of how the pieces fit together.

    But instead, use the message properties APIs. That's much easier to work with and has the same effect. It looks like there is a shipped RPG sample (amq3stm4) using MQSETMP.



    ------------------------------
    Mark Taylor
    Winchester
    ------------------------------