In fixed form RPGIV, the H spec option TruncNbr( *YES ) allow to have a small field as a result of a calculation regardless of loosing data (useful sometimes whe result comes from wrong data input).
In free form RPGLE expression such rule does not aplly.
How can I have a result field with length 3,0 when the calculation might have a result bigger than 3 digits?
Ex:
DaysToExpire = %diff(FutureExpire: %date: *days) ;
where DaysToExpire is an output field length 3,0 and FutureExpire might be any formally correct date but with a big difference from today date.
Thanks for a solution.
Regards.
In free form RPGLE expression such rule does not aplly.
How can I have a result field with length 3,0 when the calculation might have a result bigger than 3 digits?
Ex:
DaysToExpire = %diff(FutureExpire: %date: *days) ;
where DaysToExpire is an output field length 3,0 and FutureExpire might be any formally correct date but with a big difference from today date.
Thanks for a solution.
Regards.
Comment