Joined: 31 Oct 2006 Posts: 968 Location: Richmond, Virginia
A = 45065838 with no fraction, so rightmost 3 digits = 838, with no fractional part. B has room for only 3 digits to the left of the decpt, hence the code is truncating your source value on the left and giving you 838.00000, just as the PIC says.
Why are you moving a very large integer value into a field that takes a max value of 999.99999?
COBOL does this too - truncates on the left if the target field is too small. It is the programmer's resp to check for this.