Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 3 Next »

Converts the value of an expression to an integer.

Parameters

  1. Numeric or Character Expression

Examples

Example 1: Char -> Packed

pjs.define("c1", { type: 'char', length: 15, initValue: ' 12345.6789 -' });
pjs.define("p1", { type: 'packed decimal', length: 15, decimals: 5 });

p1 = pjs.parseInt(c1);

return p1;
//-12345.00000

Example 2: Zoned -> Packed

 

pjs.define("z1", { type: 'decimal', length: 9, decimals: 5, initValue: 73.73442 });
pjs.define("p1", { type: 'packed decimal', length: 15, decimals: 5 });

p1 = pjs.parseInt(z1);
 
return p1;
//73.00000

 

RPG Equivalent 

%INT()

  • No labels