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

Writing unique records into output file


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

New User


Joined: 14 Nov 2007
Posts: 37
Location: Chennai

PostPosted: Sat Sep 25, 2010 3:09 am
Reply with quote

I have one file with duplicate records and uniques records.
Input file as follows:
A1
A1
A2
A2
A3
A4
A4
A5

I want only the unique records into output file
A3
A5

Please help me any JCL or sort technique to get this output.

Thanks,
Krishna.
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: Sat Sep 25, 2010 3:17 am
Reply with quote

You can use a DFSORT/ICETOOL job like the following to do what you asked for:

Code:

//S1    EXEC  PGM=ICETOOL                             
//TOOLMSG DD SYSOUT=*                                 
//DFSMSG  DD SYSOUT=*                                 
//IN DD *                                             
A1                                                     
A1                                                     
A2                                                     
A2                                                     
A3                                                     
A4                                                     
A4                                                     
A5                                                     
//OUT DD SYSOUT=*                                     
//TOOLIN DD *                                         
SELECT FROM(IN) TO(OUT) ON(1,2,CH) NODUPS             
/*


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:

www.ibm.com/support/docview.wss?rs=114&uid=isg3T7000080
Back to top
View user's profile Send private message
Krishnadeva Reddy

New User


Joined: 14 Nov 2007
Posts: 37
Location: Chennai

PostPosted: Sat Sep 25, 2010 6:22 am
Reply with quote

Thanks.Its working fine.
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 0
No new posts Compare 2 files(F1 & F2) and writ... JCL & VSAM 8
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 Extract the file name from another fi... DFSORT/ICETOOL 6
Search our Forums:

Back to Top