Versions Compared

Key

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

...

Code Block
languagejavascript
titleWrite JavaScript String to Text File in EBCDIC 37
var buffer = Buffer.from("Hello, world.", "utf8");
pjs.writeIFSFile("/home/rfite/ebcdic.txt", buffer, 37, 1208);
Code Block
languagejavascript
titleWrite EBCDIC Field Data to UTF8 Text File
  pjs.define("myfield", { type: "char", length: 13, initValue: "Hello, world." });
  pjs.writeIFSFile("/home/rfite/utf8.txt", pjs.getBuffer(myfield), 1208, 37);