...
- Path (String) - Path to the IFS file to write.
- Data (Buffer) - A Buffer instancing containing the data to write to the file.
- File CCSID (Number/optional) – Specifies the CCSID attribute of the file. If omitted or set to zero, the IBM i job CCSID will be used.
- Data CCSID (Number/optional) - Specifies the CCSID of the data to write to the file. The data will be converted from this CCSID to the file CCSID. If this parameter is omitted or set to zero, the data will be converted from the CCSID of the IBM i job to the file CCSID. If set to 65535 no conversion will be done.
...
Code Block | ||||
---|---|---|---|---|
| ||||
pjs.define("myfield", { type: "char", length: 13, initValue: "Hello, world." });
pjs.writeIFSFile("/home/rfite/utf8.txt", pjs.getBuffer(myfield), 1208, 37); |
Code Block | ||||
---|---|---|---|---|
| ||||
var buffer = Buffer.from("Hello, world.", "utf8");
pjs.writeIFSFile("/home/rfite/utf8.txt", buffer, 1208, 65535); |