|
"Malchow, Grizzly" wrote: > > FltPrice = atoF(Chardata); > > DecPrice = %DecH(FltPrice:5:4); > > I get the following error when Chardata = '12.2963 ' > > Invalid floating-point format change detected. > > The target for a numeric operation is too small to hold the result (C G > D F) > > I've tried increasing the side of DecPrice, but that doesn't help. Is > 12.2963 too large of a value to convert? It's not the size of your DecPrice variable, its your %DECH length. Your %DECH says to return a value with 5 digits and 4 decimals, leaving only one integer digit. 12.2963 requires at least two integer digits. Try %DecH(FltPrice:6:4). But I would use the maximum number of digits: %DecH(FltPrice:30:4) (I think you are on V5R1, so 30 is the maximum there.)
As an Amazon Associate we earn from qualifying purchases.
This mailing list archive is Copyright 1997-2024 by midrange.com and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available on our policy page. If you have questions about this, please contact [javascript protected email address].
Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.