Quote: |
11.11
121 1311.1234 14141.1 18911.6456 |
Code: |
OPTION COPY
INREC IFTHEN=(WHEN=(1,10,SS,NE,C'.'),OVERLAY=(10:C'.')) OUTREC IFTHEN=(WHEN=INIT,PARSE=(%1=(ABSPOS=1,ENDBEFR=C'.',FIXLEN=5), %2=(ENDBEFR=C'|',FIXLEN=4)), BUILD=(%1,UFF,M11,LENGTH=5,C'.',%2,ZD,M11,LENGTH=4)), IFTHEN=(WHEN=INIT,BUILD=(1,10,SFF,TO=PD,LENGTH=5)) |
jathampy wrote: |
Thanks Kolusu. The one mentioned in the link previously work only for two fixed decimal digits.As per the new requirement the number of digits after decimal places can vary between 0 and 4. |
jathampy wrote: |
It worked with the below sort card. I just set a decimal point at the last position of the number field, if the number doesn't contain any decimal point. |
Code: |
//SYSIN DD * OPTION COPY ALTSEQ CODE=(40F0) INREC IFTHEN=(WHEN=INIT, BUILD=(01,10)), IFTHEN=(WHEN=INIT, PARSE=(%01=(ENDBEFR=C'.',FIXLEN=5), %02=(FIXLEN=4)), BUILD=(%01,UFF,M11,LENGTH=5, %02,TRAN=ALTSEQ)), IFTHEN=(WHEN=INIT, BUILD=(01,09,UFF,PD,LENGTH=5)) /* |
output generated using printer-friendly topic mod. All times are GMT - 5 Hours