View previous topic :: View next topic
|
Author |
Message |
babu_hi
New User
Joined: 11 Apr 2006 Posts: 93
|
|
|
|
I have an input file with 5 columns but i required only 2 columns in my output file how we can do without cobol program? |
|
Back to top |
|
|
murmohk1
Senior Member
Joined: 29 Jun 2006 Posts: 1436 Location: Bangalore,India
|
|
|
|
Babu,
Use DFSORT technique. Search DFSORT forum for INREC/OUTREC examples. |
|
Back to top |
|
|
Frank Yaeger
DFSORT Developer
Joined: 15 Feb 2005 Posts: 7129 Location: San Jose, CA
|
|
|
|
Babu,
Here's an example of how you would do that with DFSORT. I've assumed you only want the second and fifth columns of data in the output record.
Code: |
//S1 EXEC PGM=ICEMAN
//SYSOUT DD SYSOUT=*
//SORTIN DD *
ABCD EFG HI JKLM OPQRS
TUVW XYZ AB CDEF GHIJK
/*
//SORTOUT DD SYSOUT=*
//SYSIN DD *
OPTION COPY
INREC BUILD=(6,3,X,18,5)
/*
|
SORTOUT would have:
Code: |
EFG OPQRS
XYZ GHIJK
|
Of course, the exact DFSORT control statements you'd use depends on exactly what you want to do. If you need more specific help, give more details.
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 |
|
|
babu_hi
New User
Joined: 11 Apr 2006 Posts: 93
|
|
|
|
Thanks for your reply on my query.Now i got an idea how to copy the fields.
Hari |
|
Back to top |
|
|
|