|
This is the example:
var xt =
require('/QOpenSys/QIBM/ProdData/Node/os400/xstoolkit/lib/itoolkit')
var option = {
host : 'IP'
port : 8000,
path : '/cgi-bin/xmlcgi.pgm'
};
var conn = new xt.iConn('*LOCAL','USER','PASS',option);
var pgm = new xt.iPgm("ZZCALL", {"lib":"XMLSERVICE"})
console.log(pgm);
pgm.addParam("x","1A")
pgm.addParam("x","1A")
pgm.addParam("777.7777", "7p4")
pgm.addParam("7777777777.77", "12p2")
pgm.addParam(
[
["y","1A"],
["y","1A"],
["777.7777", "7p4"],
["7777777777.77", "12p2"]
])
conn.add(pgm.toXML())
console.log(pgm.toXML());
function my_call_back(str) {
var results = xt.xmlToJson(str)
results.forEach(function(result, index){
result.data.forEach(function(data, index2){
console.log("type:" + data.type + " value:" + data.value)
})
})
}
conn.run(my_call_back)
As an Amazon Associate we earn from qualifying purchases.
This mailing list archive is Copyright 1997-2024 by midrange.com and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available on our policy page. If you have questions about this, please contact [javascript protected email address].
Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.