Portal | Manuals | References | Downloads | Info | Programs | JCLs | Mainframe wiki | Quick Ref
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Profile Log in to check your private messages Log in
 
Remove duplicate records with variable structur and format

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

New User


Joined: 22 Nov 2007
Posts: 55
Location: Germany

PostPosted: Thu Mar 31, 2011 8:38 pm    Post subject: Remove duplicate records with variable structur and format
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

Senior Member


Joined: 14 Mar 2007
Posts: 10479
Location: italy

PostPosted: Thu Mar 31, 2011 9:01 pm    Post subject: Reply to: Remove duplicate records with variable structur an
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 Moderator


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

PostPosted: Thu Mar 31, 2011 11:28 pm    Post subject:
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: 55
Location: Germany

PostPosted: Fri Apr 01, 2011 9:53 pm    Post subject: Reply to: Remove duplicate records with variable structur an
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    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 To remove spaces from a VB file using... Selvarajars DFSORT/ICETOOL 5 Thu Jun 21, 2018 6:57 pm
No new posts MXG - Processing Compressed DB2 SMF r... vasanthz All Other Mainframe Topics 2 Thu May 10, 2018 12:47 am
No new posts Remove all Parenthetical Statements -... JayaprakashT DB2 2 Fri Apr 27, 2018 3:57 am
No new posts Duplicate PARM on OUTFIL sancraig16 SYNCSORT 11 Thu Apr 05, 2018 10:25 pm
No new posts Extract the records with a PD field's... sudhakar84 DFSORT/ICETOOL 11 Mon Apr 02, 2018 7:26 pm

Facebook
Back to Top
 
Job Vacancies | Forum Rules | Bookmarks | Subscriptions | FAQ | Polls | Contact Us