How to use the ibmmq.SetMp function in ibmmq

To help you get started, we’ve selected a few ibmmq examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github ibm-messaging / mq-mqi-nodejs / samples / amqsprop.js View on Github external
mq.CrtMh(hConn, cmho,function(err,mh) {
    if (err) {
      console.log(formatErr(err));
    } else {
      var smpo = new mq.MQSMPO();
      var pd  = new mq.MQPD();

      // Note how the "value" of each property can change datatype
      // without needing to be explicitly stated.
      var name="PROP1STRING";
      var value="helloStringProperty";
      mq.SetMp(hConn,mh,smpo,name,pd,value);

      name="PROP2INT";
      value=42;
      mq.SetMp(hConn,mh,smpo,name,pd,value);

      name="PROP3BOOL";
      mq.SetMp(hConn,mh,smpo,name,pd,true);

      name="PROP4BYTEARRAY";
      value=Buffer.alloc(6);
      for (var i=0;i<6;i++) {
        value[i] = 0x64 + i;
      }
      mq.SetMp(hConn,mh,smpo,name,pd,value);

      name="PROP5NULL";
      mq.SetMp(hConn,mh,smpo,name,pd);
    }

    // Describe how the Put should behave and put the message
github ibm-messaging / mq-mqi-nodejs / samples / amqsprop.js View on Github external
var value="helloStringProperty";
      mq.SetMp(hConn,mh,smpo,name,pd,value);

      name="PROP2INT";
      value=42;
      mq.SetMp(hConn,mh,smpo,name,pd,value);

      name="PROP3BOOL";
      mq.SetMp(hConn,mh,smpo,name,pd,true);

      name="PROP4BYTEARRAY";
      value=Buffer.alloc(6);
      for (var i=0;i<6;i++) {
        value[i] = 0x64 + i;
      }
      mq.SetMp(hConn,mh,smpo,name,pd,value);

      name="PROP5NULL";
      mq.SetMp(hConn,mh,smpo,name,pd);
    }

    // Describe how the Put should behave and put the message
    pmo.Options = MQC.MQPMO_NO_SYNCPOINT |
                  MQC.MQPMO_NEW_MSG_ID |
                  MQC.MQPMO_NEW_CORREL_ID;

    // Make sure the message handle is used during the Put
    pmo.OriginalMsgHandle = mh;

    mq.Put(hObj,mqmd,pmo,msg,function(err) {
      if (err) {
        console.log(formatErr(err));
github ibm-messaging / mq-mqi-nodejs / samples / amqsprop.js View on Github external
mq.CrtMh(hConn, cmho,function(err,mh) {
    if (err) {
      console.log(formatErr(err));
    } else {
      var smpo = new mq.MQSMPO();
      var pd  = new mq.MQPD();

      // Note how the "value" of each property can change datatype
      // without needing to be explicitly stated.
      var name="PROP1STRING";
      var value="helloStringProperty";
      mq.SetMp(hConn,mh,smpo,name,pd,value);

      name="PROP2INT";
      value=42;
      mq.SetMp(hConn,mh,smpo,name,pd,value);

      name="PROP3BOOL";
      mq.SetMp(hConn,mh,smpo,name,pd,true);

      name="PROP4BYTEARRAY";
      value=Buffer.alloc(6);
      for (var i=0;i<6;i++) {
        value[i] = 0x64 + i;
      }
      mq.SetMp(hConn,mh,smpo,name,pd,value);

      name="PROP5NULL";
github ibm-messaging / mq-mqi-nodejs / samples / amqsprop.js View on Github external
name="PROP2INT";
      value=42;
      mq.SetMp(hConn,mh,smpo,name,pd,value);

      name="PROP3BOOL";
      mq.SetMp(hConn,mh,smpo,name,pd,true);

      name="PROP4BYTEARRAY";
      value=Buffer.alloc(6);
      for (var i=0;i<6;i++) {
        value[i] = 0x64 + i;
      }
      mq.SetMp(hConn,mh,smpo,name,pd,value);

      name="PROP5NULL";
      mq.SetMp(hConn,mh,smpo,name,pd);
    }

    // Describe how the Put should behave and put the message
    pmo.Options = MQC.MQPMO_NO_SYNCPOINT |
                  MQC.MQPMO_NEW_MSG_ID |
                  MQC.MQPMO_NEW_CORREL_ID;

    // Make sure the message handle is used during the Put
    pmo.OriginalMsgHandle = mh;

    mq.Put(hObj,mqmd,pmo,msg,function(err) {
      if (err) {
        console.log(formatErr(err));
      } else {
        console.log("MQPUT successful");
      }
github ibm-messaging / mq-mqi-nodejs / samples / amqsprop.js View on Github external
} else {
      var smpo = new mq.MQSMPO();
      var pd  = new mq.MQPD();

      // Note how the "value" of each property can change datatype
      // without needing to be explicitly stated.
      var name="PROP1STRING";
      var value="helloStringProperty";
      mq.SetMp(hConn,mh,smpo,name,pd,value);

      name="PROP2INT";
      value=42;
      mq.SetMp(hConn,mh,smpo,name,pd,value);

      name="PROP3BOOL";
      mq.SetMp(hConn,mh,smpo,name,pd,true);

      name="PROP4BYTEARRAY";
      value=Buffer.alloc(6);
      for (var i=0;i<6;i++) {
        value[i] = 0x64 + i;
      }
      mq.SetMp(hConn,mh,smpo,name,pd,value);

      name="PROP5NULL";
      mq.SetMp(hConn,mh,smpo,name,pd);
    }

    // Describe how the Put should behave and put the message
    pmo.Options = MQC.MQPMO_NO_SYNCPOINT |
                  MQC.MQPMO_NEW_MSG_ID |
                  MQC.MQPMO_NEW_CORREL_ID;