I am working on an RFH2 extension to the package and experienced weird behavior when putting messages with format MQHRF2. I then found APAR IT13736
As suggested in the problem summary one of the following is a valid workaround
md.Format = MQFMT_RF_HEADER_2 + " "
- Setting AMQ_PARTIAL_MATCH_RFH2 on the qmgr host
Not sure if it is safe to alter behavior of setMQIString or just pad MQFMT variables in cmqc with spaces.