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

Global Moderator


Joined: 14 Mar 2007
Posts: 10374
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 Moving a COMP-3 Variable to a Numeric... ajayachander COBOL Programming 1 Thu Dec 14, 2017 5:46 pm
No new posts Inefficient BUILD - VB records paddin... Daniel Prosser SYNCSORT 2 Thu Dec 14, 2017 3:52 pm
No new posts ISSUE IN copying Sequential file reco... thesumitk JCL & VSAM 2 Wed Dec 13, 2017 3:07 pm
No new posts Merging 2 records at multiple rows wi... Bijesh DFSORT/ICETOOL 2 Wed Dec 06, 2017 1:50 am
No new posts Increment number for every group of r... srajendran2 DFSORT/ICETOOL 7 Thu Nov 09, 2017 10:31 pm

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