Give this one a try:
//SORT EXEC PGM=SORT
//SYSOUT DD SYSOUT=*
//SORTIN DD *
342.42
178.5
2432.05
255
0
//SORTOUT DD SYSOUT=*
//SYSIN DD *
INREC IFTHEN=(WHEN=INIT,
PARSE=(%01=(ENDBEFR=C'.',FIXLEN=4),
%02=(ENDBEFR=C' ',FIXLEN=2))),
IFTHEN=(WHEN=INIT,
BUILD=(1:%01,JFY=(SHIFT=RIGHT),
5:C'.',
6:%02,JFY=(SHIFT=LEFT)))
SORT FIELDS=COPY
OUTREC FINDREP=(INOUT=(C' ',C'0'),STARTPOS=1,ENDPOS=7)
//*
The following is the output produced by the above job:
0342.42
0178.50
2432.05
0255.00
0000.00
If you do not want the decimal point in the output, then you can use the following modified code instead:
//SYSIN DD *
INREC IFTHEN=(WHEN=INIT,
PARSE=(%01=(ENDBEFR=C'.',FIXLEN=4),
%02=(ENDBEFR=C' ',FIXLEN=2))),
IFTHEN=(WHEN=INIT,
BUILD=(1:%01,JFY=(SHIFT=RIGHT),
5:%02,JFY=(SHIFT=LEFT)))
SORT FIELDS=COPY
OUTREC FINDREP=(INOUT=(C' ',C'0'),STARTPOS=1,ENDPOS=6)
//*
And here is the new output:
034242
017850
243205
025500
000000