Ü %ABS (Absolute value of a numeric)

·         This built-in function is used to get the absolute value of a numeric expression.


Example –%abs built-in function in rpgle


D float          s              8f   inz (-1)
D integer        s             10i 0 inz (-123)
D packed         s              7p 3 inz (-1234.567)
    f8  = %abs (float);        // "float" is now 1.
    i10 = %abs (integer);      // "integer" is now 123.
    p7  = %abs (packed);       // "packed" is now 1234.567.

User Comments:



Copyright © Go4as400.com, 2013-2017. Copyright notice