I have an awk script from omvs I use on one application.
SACLWAG:/ars/tmp: >cat refmt.ppr
#!/bin/ksh
######################################################################
# Script Name: refmt.ppr
# Description: Reformat 5th field of input file to contain decimal
# (from xxxxx to xxx.xx).
# It does not modify the first line of input file.
# Usage : cat <inputfile> | refmt.ppr
# Parameter : input file is from stdin.
# Change Activitiy:
# 06/23/10 pgove - Initial code.
#######################################################################
awk -F"\x05" '{
if ( NR == 1) {
print $0
next
}
start_c5 = length($1) + length($2) + length($3) + length($4) + 4
len = length($5)
part1 = substr($0, 1, start_c5)
amount = substr($5, 1, len-2) "." substr($5, len-1)
part2 = substr($0, start_c5+len+1)
print part1 amount part2
}'