Data Conversion API
Overview
The Data Conversion API contains the Profound.js APIs used to convert a value from one data type to another, and to move data between fields without type checking. These APIs are the Profound.js equivalents of the RPG MOVE and MOVEL operation codes, the RPG %CHAR() built-in function, and the CL %BINARY() built-in function.
The APIs in this section fall into three groups:
Type conversion - pjs.char() converts a value into its character representation.
Untyped field moves - pjs.move() and pjs.moveLeft() copy data from one field into another without type checking, right adjusted and left adjusted respectively.
Binary integer access - pjs.getInt() and pjs.setInt() read and write signed binary integers held inside a character field. Both are provided to help convert IBM i CL programs to Profound.js.
The fields used with these APIs are declared with pjs.define().