Page tree

Versions Compared


  • This line was added.
  • This line was removed.
  • Formatting was changed.
Comment: Migrated to Confluence 5.3

This method positions the file at the next record with a key or relative record number equal to or greater than that specified in the search argument.

  1. Search argument - A Number, String, or Array value specifying a relative record number, key value, or list of key values (array of Number/String). The special values pjs.HIGH_VALUE, pjs.LOW_VALUE, pjs.START, and pjs.END can also be used.
  2. Record format name (optional) - A String value specifying the record format name.

Exception Handling

An Error instance will be thrown with the following properties:

  • message - The message text.
  • error - The message id.
  • help - The message help text.
Code Block
titlePosition to end of file to read last record
pjs.defineTable("myfile", { keyed: true, read: true });
Code Block
titleRead all records with first and second keys equal to 100 and 200
pjs.defineTable("myfile", { keyed: true, read: true });
myfile.positionTo([100, 200]);
myfile.fetchNextEqual([100, 200]);
while (!file.endOfData()) { 
  // Do something with record data here.
  myfile.fetchNextEqual([100, 200]);

RPG Equivalent



This API requires the Profound.js Connector module.