You are trying to do something that the product is not designed for, so I agree with Gary, it may be time to rethink the strategy.
However, what you want to do, can be done.
Just apply a function to the column, one that returns the result in a displayable format, that is easy with integers, but for decimals it becomes a bit more complicated.
integercolumn is defined as pic s9(7) comp-3
decimalcolumn is defined as pic 9.9999 comp-3
You will have to figure out what the length of the resulting column is to correctly do the substr().
SELECT CONCAT(' ' NEXIH(intergercolumn) ' ' -
NEXIL(decimalcolumn) '.' -
TRANSLATE( -
SUBSTR( -
decimalcolumn * 10000 - NEXIL(decimalcolumn) * 10000,13,4) -
,0,' ') -
) -
FROM record -
OUTPUT OUTFILE;
The result should look like this:
aaaaa 1.0000
bbbbb 0.3000
cccccc 0.7000
dddddd 1.0000
eeeeeee 0.0000
With all that you are probab,y better off writing a Cobol program or do it in Culprit.
The Culprit code would look like this:
PATH01 record
01510001 integercolumn fm '9999999'
01510011 decimalcolumn fm '9.9999'