01-29-2014 01:00 PM
It originally was numeric and I converted the data to character data. I was able to add a leading zero by doing this but I also need to add a trailing zero as well.
example: '3' to '030'
01-29-2014 01:06 PM
Consider either multiplying the numeric by 10 before converting it to character, or when it is character consider using the cats() function, e.g.:
03-13-2014 04:54 PM
I have a similar problem. When I merge number with decimals, the decimals that are zero get cut off. For example, merging 2.500 and 6.050 would produce 2.5-6.05. How do I get the program to stop cutting off the zeroes and output 2.500-6.050?
03-13-2014 06:00 PM
The values aren't cut off it is a result of internal numeric storage.
You don't show how you have attempted to create your 2.500 - 6.050 but the likeliest answer is going to involve a format that displays at a given precision.
For example a value of 2.5 will display at 2.500 when using something like F6.3 which forces every appearance to show 3 values to the right of a decimal point.
One way to create a string of your example
result = catx(' - ',put(x,7.3),put (y,7.3));