Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Code Block
languagejavascript
titleDefine a table with a dynamic file name
pjs.defineTable("read", { field: "fileName", extDesc: "PRODUCTSP" }, { read: true, userOpen: true });
pjs.define("fileName", { type: 'char', length: 25, varying: true });
fileName = "PRODUCTSL1";
read.open();
read.fetchNext();
Code Block
languagejavascript
titleDefining a table with userOpen and infDS
  pjs.defineTable("productsp", { infDS: 'OPNFBK',  userOpen: true,  read: true,  levelIds: [ '4AFA8C636F188' ] });

  pjs.define("OPNFBK", { type: 'data structure', elements: {
    "FILE": { special: '*file' },
    "OPEN_IND": { type: 'boolean' },
    "ODP_TYPE": { type: 'char', from: 81, to: 82 },
    "FILE_NAME": { type: 'char', from: 83, to: 92 },
    "LIBRARY": { type: 'char', from: 93, to: 102 }
  }});

  pjs.define("data", { type: 'char', length: 24, varying: true });

  productsp.open();
  data = OPNFBK.substr(80, 22) + OPEN_IND.toString();
  productsp.close();
  data += OPEN_IND.toString();

...