10-01-2015 10:19 AM
I'm having an issue formatting a percentage to decimal. The code is currently set to format 5.4. For 1.00% and 100.00% it converts both to .0100. Is there a workaround for this?
10-01-2015 11:28 AM
Can you post example data? 1% is 0.01 and 100% is 1.
A format of 5.4 would not leave any room to display values to the left of the decimal place. So a value or 1 (or 100%) would only be able to show 3 decimal places ('1.000' ).
If your numbers are changing their decimal place on you then perhaps you are mistakenly usng an INFORMAT of 5.4. The decimal part of an INFORMAT is not normally used. It means where to insert a decimal point WHEN NO DECIMAL POINT is present. So if you read '1' using F5.4 it would convert that to 0.0001 .
10-01-2015 11:49 AM
To add to Tom's response, if you are reading data an the value is a percentage you might look at using the Percent informat.
You might post the code and some data that is showing this behavior.