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
 

 

Remove duplicate. copying from flat file to VSAM

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> JCL & VSAM
View previous topic :: :: View next topic  
Author Message
Prakash Ramnani

New User


Joined: 02 Jun 2007
Posts: 5
Location: Rhode Island

PostPosted: Sat Jun 09, 2007 2:28 am    Post subject: Remove duplicate. copying from flat file to VSAM
Reply with quote

Hi,
I am trying to Repro a flat file into VSAM and it is giving SEQUENCE error because the flat file has duplicates records. I want all the duplicate records in a seperate file.
i do not want to use ICE TOOL


eq:
File1 --> Flat file
File2 --> Vsam file
File3 --> Duplicate file

File1
1
1
2
3
4
4
5
6
6

File2
1
2
3
4
5
6

File3
1
4
6
Back to top
View user's profile Send private message

expat

Global Moderator


Joined: 14 Mar 2007
Posts: 8593
Location: Back in jolly old England

PostPosted: Sat Jun 09, 2007 2:30 am    Post subject:
Reply with quote

Use SORT to sort the file on the VSAM key and use SUM FIELDS=NONE to remove duplicate keys.

If you do not want to use ICETOOL, then what else do you suggest to achieve file 3 ?
Back to top
View user's profile Send private message
Prakash Ramnani

New User


Joined: 02 Jun 2007
Posts: 5
Location: Rhode Island

PostPosted: Sat Jun 09, 2007 2:39 am    Post subject: Re: Remove duplicate. copying from flat file to VSAM
Reply with quote

The second file i.e the flat file is sorted file..I have no idea how the File3 will be used.
Back to top
View user's profile Send private message
dick scherrer

Site Director


Joined: 23 Nov 2006
Posts: 19270
Location: Inside the Matrix

PostPosted: Sat Jun 09, 2007 3:03 am    Post subject:
Reply with quote

Hello,

Regardless if the records are already in order, you can use the SUM FILES=NONE to remove the duplicates. Once you've removed the duplicates, you might look thru the "smart DFSORT tricks"
http://www.ibm.com/servers/storage/support/software/sort/mvs/tricks/ and see if there was anything that would match the 2 files and put the "extras" in a 3rd file.

If you "don't want" to use the built-in features of DFSORT to do what you require (i.e. ICETOOL), you can always use program code. This would be rather trivial code. . . It would also eliminate any use of the sort product.
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 -> JCL & VSAM All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts Split file based on comparsion to 2 f... Div Grad DFSORT/ICETOOL 3 Thu Jul 27, 2017 9:16 pm
No new posts Extra character appears in file when ... Balu5491 All Other Mainframe Topics 1 Wed Jul 26, 2017 2:39 pm
No new posts SSH - known_hosts file configuration vasanthz All Other Mainframe Topics 2 Wed Jul 26, 2017 2:10 am
No new posts copying data without knowing location arunsoods DFSORT/ICETOOL 11 Thu Jul 20, 2017 1:03 pm
This topic is locked: you cannot edit posts or make replies. Fetching data from BAI File arunsoods JCL & VSAM 1 Wed Jul 19, 2017 4:28 pm


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