pjs.char()
The pjs.char() API will convert a value into a character representation.Â
Parameters
Value or Field
Format (optional) - can be used if a date or time value is passed in
Example
Example 1: packed decimal -> char
pjs.define("s", { type: 'packed decimal', length: 3, decimals: 0, initValue: 4 });
pjs.define("c", { type: 'char', length: 5, varying: true });
c = pjs.char(s);
return c;
// "4 "
Example 2: date -> char
pjs.define("datefld", { type: 'date', initValue: pjs.date('2016-06-13') });
pjs.define("out1", { type: 'char', length: 10 });
pjs.define("out2", { type: 'char', length: 10 });
pjs.define("out3", { type: 'char', length: 6 });
out1 = pjs.char(datefld);
out2 = pjs.char(datefld, "*usa");
out3 = pjs.char(datefld, "*mdy0");
RPG Equivalent
%CHAR()
Some documentation pages have recently moved to a new section: Profound AppDev. If you are having trouble finding specific pages, try the documentation search capability or reach out to our Support team!