...
Code Block |
---|
var command = "CRTDUPOBJ OBJ(ORDERSP) FROMLIB(DATALIB) OBJTYPE(*FILE) TOLIB(QTEMP) NEWOBJ(WORKFILE) DATA(*NO)"; pjs.runCommand(command); |
Example 3: Run a command with parameters with return value (this feature is available since Profound.js xxx)
Code Block |
---|
CL code:
DCL VAR(&NBRRCD) TYPE(*DEC) LEN(10 0)
RTVMBRD FILE(PJSTEST/PRODUCTSP) NBRCURRCD(&NBRRCD)
PJS code:
pjs.define("nbrRcd", { type: 'packed', length: 10, decimals: 0});
pjs.runCommand(`RTVMBRD FILE(PJSTEST/PRODUCTSP) NBRCURRCD(&nbrRcd)`);
console.log(`nbrRcd = ${nbrRcd}`); |
Examples for error-handling
...