Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
function setQ(hObj) {
// We will set 3 attributes of the queue.
var selectors = [new mq.MQAttr(MQC.MQIA_INHIBIT_PUT,MQC.MQQA_PUT_INHIBITED),
new mq.MQAttr(MQC.MQIA_INHIBIT_GET,MQC.MQQA_GET_INHIBITED),
new mq.MQAttr(MQC.MQCA_TRIGGER_DATA,"TrigData After"),
];
try {
mq.Set(hObj,selectors);
} catch (err) {
console.log(err.message);
}
}
function inqQmgr(hObj) {
// We will request 3 attributes of the queue manager.
var selectors = [new mq.MQAttr(MQC.MQCA_Q_MGR_NAME),
new mq.MQAttr(MQC.MQCA_DEAD_LETTER_Q_NAME),
new mq.MQAttr(MQC.MQIA_CODED_CHAR_SET_ID)
];
try {
mq.Inq(hObj,selectors);
console.log("ccsid=%d qmgrName = \"%s\", dlqName = \"%s\"",selectors[2].value,selectors[0].value,selectors[1].value);
} catch (err) {
console.log(err.message);
}
}
function setQ(hObj) {
// We will set 3 attributes of the queue.
var selectors = [new mq.MQAttr(MQC.MQIA_INHIBIT_PUT,MQC.MQQA_PUT_INHIBITED),
new mq.MQAttr(MQC.MQIA_INHIBIT_GET,MQC.MQQA_GET_INHIBITED),
new mq.MQAttr(MQC.MQCA_TRIGGER_DATA,"TrigData After"),
];
try {
mq.Set(hObj,selectors);
} catch (err) {
console.log(err.message);
}
}
function inqQmgr(hObj) {
// We will request 3 attributes of the queue manager.
var selectors = [new mq.MQAttr(MQC.MQCA_Q_MGR_NAME),
new mq.MQAttr(MQC.MQCA_DEAD_LETTER_Q_NAME),
new mq.MQAttr(MQC.MQIA_CODED_CHAR_SET_ID)
];
try {
mq.Inq(hObj,selectors);
console.log("ccsid=%d qmgrName = \"%s\", dlqName = \"%s\"",selectors[2].value,selectors[0].value,selectors[1].value);
} catch (err) {
console.log(err.message);
}
}
function setQ(hObj) {
// We will set 3 attributes of the queue.
var selectors = [new mq.MQAttr(MQC.MQIA_INHIBIT_PUT,MQC.MQQA_PUT_INHIBITED),
new mq.MQAttr(MQC.MQIA_INHIBIT_GET,MQC.MQQA_GET_INHIBITED),
new mq.MQAttr(MQC.MQCA_TRIGGER_DATA,"TrigData After"),
];
try {
mq.Set(hObj,selectors);
} catch (err) {
console.log(err.message);
}
}
function inqQmgr(hObj) {
// We will request 3 attributes of the queue manager.
var selectors = [new mq.MQAttr(MQC.MQCA_Q_MGR_NAME),
new mq.MQAttr(MQC.MQCA_DEAD_LETTER_Q_NAME),
new mq.MQAttr(MQC.MQIA_CODED_CHAR_SET_ID)
];
try {
mq.Inq(hObj,selectors);
console.log("ccsid=%d qmgrName = \"%s\", dlqName = \"%s\"",selectors[2].value,selectors[0].value,selectors[1].value);
} catch (err) {
console.log(err.message);
}
}