Open jptech8 opened 8 months ago
Below peice of code not same string to MQside instead its writing some gibberish headers character at MQ side , it set MQMDas well
function putMessage(hObj) {
55
56 var msg = 'MSH|^~\&|SENDING_APP|SENDING_FACILITY|RECEIVING_APP|RECEIVING_FACILITY|20220229120000||ADT^A08|123456789|P|2.3||||'
57
58 var mqmd = new mq.MQMD(); // Defaults are fine.
59 var pmo = new mq.MQPMO();
60var mqmd = new mq.MQMD();
mqmd.Format = 'MQSTR'
62 pmo.Options = MQC.MQPMO_NO_SYNCPOINT |
63 MQC.MQPMO_NEW_MSG_ID |
64 MQC.MQPMO_NEW_CORREL_ID;
65
66 mq.Put(hObj,mqmd,pmo,msg,function(err) {
67 if (err) {
68 console.log(formatErr(err));
69 } else {
70 console.log("MsgId: " + toHexString(mqmd.MsgId));
71 console.log("MQPUT successful");
72 }
73 });
74}
any idea to set 37 EBCDIC character set
Please format your code so it is readable. You don't need to include line numbers.
Below peice of code not same string to MQside instead its writing some gibberish headers character at MQ side , it set MQMDas well
function putMessage(hObj) {
55
56 var msg = 'MSH|^~\&|SENDING_APP|SENDING_FACILITY|RECEIVING_APP|RECEIVING_FACILITY|20220229120000||ADT^A08|123456789|P|2.3||||'
57
58 var mqmd = new mq.MQMD(); // Defaults are fine.
59 var pmo = new mq.MQPMO();
60var mqmd = new mq.MQMD();
mqmd.Format = 'MQSTR'
62 pmo.Options = MQC.MQPMO_NO_SYNCPOINT |
63 MQC.MQPMO_NEW_MSG_ID |
64 MQC.MQPMO_NEW_CORREL_ID;
65
66 mq.Put(hObj,mqmd,pmo,msg,function(err) {
67 if (err) {
68 console.log(formatErr(err));
69 } else {
70 console.log("MsgId: " + toHexString(mqmd.MsgId));
71 console.log("MQPUT successful");
72 }
73 });
74}