I have converted delimited files into nice mainframe centric fixed position datasets. Here's an skeleton of an example of taking a file that came from EXCEL as TXT tab delimited and became a friendly dataset. In this case I wanted each field to be 30 bytes just for my visual ease but each field can be whatever you think its max length might be.

//SORTIN    DD *
 SORT FIELDS=COPY
 OUTFIL PARSE=(%01=(ENDBEFR=X'05',FIXLEN=30),    COL.A
               %02=(ENDBEFR=X'05',FIXLEN=30),    COL.B
               %03=(ENDBEFR=X'05',FIXLEN=30),    COL.C
               %04=(ENDBEFR=X'05',FIXLEN=30),    COL.D
               %05=(ENDBEFR=X'05',FIXLEN=30)),   COL.E
 BUILD=(%01,5X,%02,5X,%03,5X,%04,5X,%05)

LRECL will be sum of (30x5) + 20 blanks.

The dates manipulation I have to defer to Sri.



On 7/1/2015 5:33 PM, Sri h Kolusu wrote:
For some reason this topic did not show up in my mail box but is available
here

https://groups.google.com/d/msg/bit.listserv.ibm-main/p4tGxAcXyPQ/uyoz0k7_y4oJ

June,

DFSORT can definitely convert the comma delimited file into a fixed length
file. As for the conversion of the dates and padding you need to have a
second parse to get the values from ZM/ZD/YYYY birth date that needs to be
converted to MM/DD/YYYY .

Send me a sample of your input and desired output as text files to our
hotline at [email protected] or send it to me directly and I will show you
a way to do it.

Thanks,
Kolusu
DFSORT Development
IBM Corporation

----------------------------------------------------------------------
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to [email protected] with the message: INFO IBM-MAIN


----------------------------------------------------------------------
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to [email protected] with the message: INFO IBM-MAIN

Reply via email to