pjs.unsignedInt()
Converts the value of an expression to an unsigned integer.
Parameters
Numeric or Character Expression
Examples
Example 1: Packed -> Unsigned Integer
pjs.define("u1", { type: 'unsigned integer' });
pjs.define("p1", { type: 'packed decimal', length: 7, decimals: 3, initValue: 8236.567 });
u1 = pjs.unsignedInt(p1);
return u1;
//8236
Example 2: Char -> Packed
pjs.define("c1", { type: 'char', length: 15, initValue: ' 12345.6789 +' });
pjs.define("p1", { type: 'packed decimal', length: 15, decimals: 5 });
p1 = pjs.unsignedInt(c1);
return p1;
//12345.00000
RPG Equivalent
%UNS()
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!