Enzyme, Pharmaceutical Aids, Miscellaneous Last Part of Chapter no 5th.pdf
as400 built in function- %INTH
1. %INTH (Convert to Integer Format with Half Adjust)
%INTH is very much similar to %INT except that if the expression is a decimal, float or character
value, half adjust is applied to the value of the expression while converting it to integer type.
Example
Columns . . . :
6 80
Browse
AMITCC/QRPGLESRC
SEU==>
BIN_INTH
FMT D DName+++++++++++ETDsFrom+++To/L+++IDc.Keywords+++++++++++++++++++++++++++++
*************** Beginning of data ****************************************************
0001.00 DA
S
5P 3 INZ(12.348)
130201
0002.00 DB
S
5S 3 INZ(12.555)
130201
0003.00 DC
S
8F
INZ(13.555)
130201
0004.00 DINT1
S
2 0 INZ(*ZEROS)
130201
0005.00 C
EVAL
INT1=%INTH(A)
130201
0006.00 C
INT1
DSPLY
130201
0007.00 C
EVAL
INT1=%INTH(B)
130201
0008.00 C
INT1
DSPLY
130201
0009.00 C
EVAL
INT1=%INTH(C)
130201
0010.00 C
INT1
DSPLY
130201
0011.00 C
SETON
LR
130201
****************** End of data *******************************************************
OUTPUT
12
13
14