...
- Data structure
Return value
This API returns Numeric value representing the current occurrence in the data-structure.position
Example
Code Block | ||
---|---|---|
| ||
pjs.define("ds", { type: 'data structure', qualified: true, occurs: 2, elements: { "sub1": { type: 'char', length: 1 }, "sub2": { type: 'char', length: 1 } }}); pjs.define("test1", { type: 'integer', length: 3, decimals: 0 }); pjs.define("test2", { type: 'integer', length: 3, decimals: 0 }); pjs.define("test3", { type: 'integer', length: 3, decimals: 0 }); test1 = pjs.getOccur(ds); pjs.setOccur(ds, pjs.getOccur(ds) + 1); test2 = pjs.getOccur(ds); pjs.setOccur(ds, pjs.getOccur(ds) - 1); test3 = pjs.getOccur(ds); |
...
RPG Equivalent
OCCUR, %OCCUR()