added iQsh
Issue #4
closed
The latest XMLSERVICE supports <qsh> tag. I added iQsh class to itoolkit.js.
var assert = require('assert');
var NodeVer = process.version.slice(1,2);
assert.notEqual(NodeVer, '0', 'Unsupported version of Node.js!');
var xt = require('/QOpenSys/QIBM/ProdData/OPS/Node'+NodeVer+'/os400/xstoolkit/lib/itoolkit');
var hint = 'check the "success" property in return value'
var opt = {
xslib : 'XMLSERVICE',
db : '*LOCAL',
user : 'USER',
pwd : 'PWD'
//host : 'ut28p63',
//port : 80,
//path : '/cgi-bin/xmlcgi.pgm'
};
var conn = new xt.iConn(opt.db,null,null,opt);
conn.debug(true);
conn.add(xt.iQsh('system wrksyssts'));
conn.run(function(str){
var results = xt.xmlToJson(str);
var success = true;
results.every(function(result, i){
if(result.hasOwnProperty('success'))
success = result.success == true;
});
console.log(JSON.stringify(results));
});
Comments (6)
-
Account Deleted reporter -
Account Deactivated XMLSERVICE PTF SI64215(7.1) and SI64216(7.2) are built to support the new iQsh tag. I have verified them with the new iQsh test case. But I can not build XMLSERVICE 1.9.9 on 7.3 systems.
-
Account Deleted reporter Thanks for finding the compile fail. I fixed source in version xmlservice 1.9.9.1 (minor).
Source savf: Yips download
GIT updated: inext/xmlservice-rpg
-
Account Deactivated The three XMLSERVICE PTFs will be released soon.
- IBM i 7.1 -- SI64215
- IBM i 7.2 -- SI64216
- IBM i 7.3 -- SI64324
-
Account Deleted reporter - changed status to closed
complete
-
migrated issue to: https://github.com/IBM/nodejs-itoolkit/issues/4
- Log in to comment
Note: In example above i am overriding the default QXMLSERV(.lib) to XMLSERVICE(.lib). IBM DGO team (Apache) will need to produce a new PTF to update QXMLSERV copy of xmlservice. Also, i suppose IBM OPS node product will need to add PTF sometime.
Anyway, you can download itoolkit from here. I replaced the Node4 version with this enhanced support in my test.
You can download and compile new xmlservice from yips into XMLSERVICE(.lib). Follow the installation instructions at yips xmlservice . Happy Open Source.