Portal | Manuals | References | Downloads | Info | Programs | JCLs | Master the Mainframes
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Usergroups Profile Log in to check your private messages Log in
 

 

Deleting Unique records from a sequential File.

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> DFSORT/ICETOOL
View previous topic :: :: View next topic  
Author Message
hernikiten

New User


Joined: 08 Apr 2005
Posts: 23
Location: india

PostPosted: Wed Feb 21, 2007 8:25 pm    Post subject: Deleting Unique records from a sequential File.
Reply with quote

I have a situation where in I ought to delete unique records from a sorted file.
Back to top
View user's profile Send private message

prav_06
Warnings : 1

Active User


Joined: 13 Dec 2005
Posts: 154
Location: The Netherlands

PostPosted: Wed Feb 21, 2007 8:52 pm    Post subject:
Reply with quote

hernikiten,

Quote:
delete unique records from a sorted file.


Can u please be more clear, If u had provided SUM Fields=none for the sorted file each record would be unique. or u r tryin to say that u have to copy all unique recods from a input file to output file.?


Thamilzan.
Back to top
View user's profile Send private message
hernikiten

New User


Joined: 08 Apr 2005
Posts: 23
Location: india

PostPosted: Wed Feb 21, 2007 9:20 pm    Post subject: Re: Deleting Unique records from a sequential File.
Reply with quote

I want to remove records which are not duplicate.
I know the sum fields = none usage, but its different case here.
please advice.
Back to top
View user's profile Send private message
Frank Yaeger

DFSORT Moderator


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

PostPosted: Wed Feb 21, 2007 10:42 pm    Post subject:
Reply with quote

hernikiten,

If you want to keep just the duplicate records, you can use a DFSORT/ICETOOL job like this. I assumed your "key" is in positions 11-15, but you can change the job as needed.

Code:

//S1    EXEC  PGM=ICETOOL                             
//TOOLMSG DD SYSOUT=*                                 
//DFSMSG  DD SYSOUT=*                                 
//IN DD DSN=...  input file                     
//OUT DD DSN=...  output file                             
//TOOLIN   DD    *                                   
SELECT FROM(IN) TO(OUT) ON(11,5,CH) ALLDUPS           
/*                                                   


For complete information on all of the ways you can handle duplicate and non-duplicate records with the SELECT operator of DFSORT's ICETOOL,
see:

http://publibz.boulder.ibm.com/cgi-bin/bookmgr_OS390/BOOKS/ICE1CA20/6.11?DT=20060615185603
Back to top
View user's profile Send private message
hernikiten

New User


Joined: 08 Apr 2005
Posts: 23
Location: india

PostPosted: Thu Feb 22, 2007 5:42 pm    Post subject: Re: Deleting Unique records from a sequential File.
Reply with quote

Many Thanks Frank,

I tested it and 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    IBMMAINFRAMES.com Support Forums -> DFSORT/ICETOOL All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts SORTJOIN - Copy Matched and Unmatched... Steve Ironmonger DFSORT/ICETOOL 5 Tue Jan 17, 2017 4:26 pm
No new posts Copy RECFM =VB TO FB file with RECL =... sahil41352 DFSORT/ICETOOL 3 Wed Dec 28, 2016 11:29 pm
No new posts Removing Duplicates based on certain ... chandracdac DFSORT/ICETOOL 8 Fri Dec 09, 2016 4:40 am
No new posts Add PD field from 2nd file to PD in 1st Sushant Garje DFSORT/ICETOOL 6 Thu Dec 01, 2016 4:32 pm
No new posts File Aid to File Manager conversion murali3955 IBM Tools 4 Thu Nov 24, 2016 3:41 pm


Facebook
Back to Top
 
Mainframe Wiki | Forum Rules | Bookmarks | Subscriptions | FAQ | Tutorials | Contact Us