View previous topic :: View next topic
|
Author |
Message |
chittibabu.sa
New User
Joined: 24 Sep 2008 Posts: 2 Location: Chennai
|
|
|
|
Hi,
First i did a search in this forum for my below requirement. However, i got something related to that .
Please share me if you already done this kind of formatting.
I would like to convert the fixed length input file into CSV format file using SORT.
Input file:
123AAA456
456BBB789
789CCC012
Expecting ouput:
123,AAA,456
456,BBB,789
789,CCC,012
Thanks,
Chitti. |
|
Back to top |
|
|
Frank Yaeger
DFSORT Developer
Joined: 15 Feb 2005 Posts: 7129 Location: San Jose, CA
|
|
|
|
Chitti,
If you just want to insert a comma between 3 byte fields, you can use a DFSORT job like this:
Code: |
//S1 EXEC PGM=SORT
//SYSOUT DD SYSOUT=*
//SORTIN DD *
123AAA456
456BBB789
789CCC012
//SORTOUT DD SYSOUT=*
//SYSIN DD *
OPTION COPY
INREC BUILD=(1,3,C',',4,3,C',',7,3,80:X)
/*
|
If you want to do something else, you need to explain more clearly and in more detail what you want to do. |
|
Back to top |
|
|
chittibabu.sa
New User
Joined: 24 Sep 2008 Posts: 2 Location: Chennai
|
|
|
|
Your code works well. Thank you Frank. I would like to explore SORT features. Can you please suggest some books or manuals.
Chitti. |
|
Back to top |
|
|
dick scherrer
Moderator Emeritus
Joined: 23 Nov 2006 Posts: 19244 Location: Inside the Matrix
|
|
Back to top |
|
|
Frank Yaeger
DFSORT Developer
Joined: 15 Feb 2005 Posts: 7129 Location: San Jose, CA
|
|
|
|
Chitti,
If you're not familiar with DFSORT and DFSORT's ICETOOL, I'd suggest reading through "z/OS DFSORT: Getting Started". It's an excellent tutorial, with lots of examples, that will show you how to use DFSORT, DFSORT's ICETOOL and DFSORT Symbols. You can access it online, along with all of the other DFSORT books, from:
Use [URL] BBCode for External Links |
|
Back to top |
|
|
|