IBM Mainframe Forum Index
 
Log In
 
IBM Mainframe Forum Index Mainframe: Search IBM Mainframe Forum: FAQ Register
 

How to filter fields from the input file using SORT


IBM Mainframe Forums -> DFSORT/ICETOOL
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
lekshmi_ci

New User


Joined: 14 Mar 2007
Posts: 60
Location: Thiruvananthapuram

PostPosted: Thu Mar 15, 2007 2:31 pm
Reply with quote

Hi
I have an input file with records
10aaa200
01bbb290
30ddd300
i need only the second field(ie aaa,bbb,ddd) in the output file in the sorted format.
Please help me in resolving this

Thanks
LC
Back to top
View user's profile Send private message
murmohk1

Senior Member


Joined: 29 Jun 2006
Posts: 1436
Location: Bangalore,India

PostPosted: Thu Mar 15, 2007 2:40 pm
Reply with quote

Use OUTREC statement:

Code:
//SYSIN DD *
  SORT FIELDS=(3,3,CH,A)      * sort in ascending order
  OUTREC FIELDS=(3,3,80:X)
/*


Assumption your OP file is 80 in lenght
Back to top
View user's profile Send private message
lekshmi_ci

New User


Joined: 14 Mar 2007
Posts: 60
Location: Thiruvananthapuram

PostPosted: Thu Mar 15, 2007 2:54 pm
Reply with quote

thank you Murali icon_smile.gif ..It worked
Back to top
View user's profile Send private message
Frank Yaeger

DFSORT Developer


Joined: 15 Feb 2005
Posts: 7129
Location: San Jose, CA

PostPosted: Thu Mar 15, 2007 8:50 pm
Reply with quote

LC,

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
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   Reply to topic View Bookmarks
All times are GMT + 6 Hours
Forum Index -> DFSORT/ICETOOL

 


Similar Topics
Topic Forum Replies
No new posts Compare 2 files and retrive records f... DFSORT/ICETOOL 3
No new posts TRIM everything from input, output co... DFSORT/ICETOOL 1
No new posts FTP VB File from Mainframe retaining ... JCL & VSAM 8
No new posts Need to set RC4 through JCL SORT DFSORT/ICETOOL 5
No new posts Extract the file name from another fi... DFSORT/ICETOOL 6
Search our Forums:

Back to Top