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

Remove duplicate records with variable structur and format


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

New User


Joined: 22 Nov 2007
Posts: 64
Location: Germany

PostPosted: Thu Mar 31, 2011 8:38 pm
Reply with quote

Hi,

I like to remove all duplicate records from a file.
Unfortunately the file has different record structurs and within different field formats.

Example for a file :

c = char, b = binary, p = packed decimal field

bbbbcccc
cccbbpppccccc
ppccccccccb
ppbccbbccc
ppccccccccb this is duplicate
bbbbcccc this is duplicate
bbbbcc
bbbbcccc this is duplicate

Is it possible to solve the problem with DFSORT or ICETOOL ?

Many thanks in advance for help
Back to top
View user's profile Send private message
enrico-sorichetti

Superior Member


Joined: 14 Mar 2007
Posts: 10873
Location: italy

PostPosted: Thu Mar 31, 2011 9:01 pm
Reply with quote

the forum is rich of examples on how to build intermediate records with added fields to be used for sort processing that can be dropped when writing the output files

according to the input record type in the hope one exists
build an auxiliary field of the proper length and content on which run the duplicate check
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 31, 2011 11:28 pm
Reply with quote

oerdgie,

If your PD fields are normalized - that is, they all have the same sign (e.g. C) for positive values, you can just use BI for the comparison field. BI will just compare the bits and as long as the PD fields are normalized, a bit comparison will work fine to find duplicates.

You can use SELECT with ON(p,m,BI) and FIRST, or SORT FIELDS=(p,m,BI,A) and SUM FIELDS=NONE, to remove the duplicates.
Back to top
View user's profile Send private message
oerdgie

New User


Joined: 22 Nov 2007
Posts: 64
Location: Germany

PostPosted: Fri Apr 01, 2011 9:53 pm
Reply with quote

Hi Frank,

it works, thank's a lot for help ! icon_smile.gif

Regards
oerdgie
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 Binary File format getting change whi... All Other Mainframe Topics 5
No new posts To fetch records that has Ttamp value... DFSORT/ICETOOL 4
No new posts ICETOOL returns no records JCL & VSAM 1
No new posts Compare 2 files and retrive records f... DFSORT/ICETOOL 3
No new posts Compare 2 files(F1 & F2) and writ... JCL & VSAM 8
Search our Forums:

Back to Top