file.write()



This method inserts a record into the file.

Parameters
  1. Record format name (optional) - A String value specifying the record format name.

  2. Output data structure (optional) - A Profound.js data structure reference. If specified, the record will be populated with the values from the data structure. If the data structure is not qualified, you must wrap the parameter with the pjs.ds() API.

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.

Examples
Write record
pjs.defineTable("myfile", { write: true }); field1 = 123; field2 = "abc"; myfile.write();


RPG Equivalent

WRITE

Requirements

This API requires the Profound.js Connector module.