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
 
Retrieving matched duplicate records

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> CA Products
View previous topic :: :: View next topic  
Author Message
Huzefa

New User


Joined: 05 Dec 2006
Posts: 85
Location: Bangalore

PostPosted: Wed Apr 11, 2007 5:48 pm    Post subject: Retrieving matched duplicate records
Reply with quote

Hi,
I have the following requirement

File 1

Key Value
42 9876
43 7654
44 5432

File 2

Key Value
42 9876
43 7654
44 5432

The output file should be

42 9876 7654
42 9876 5432
43 7654 9876
43 7654 5432
44 5432 9876
44 5432 7654

Currently I am using the matched function of Easytrieve which doesnot help me to get the above result.

I get the result as
42 9876 7654
43 7654 9876

If anybody knows the solution please help me out
Back to top
View user's profile Send private message

William Thompson

Global Moderator


Joined: 18 Nov 2006
Posts: 3158
Location: Tucson AZ

PostPosted: Wed Apr 11, 2007 6:13 pm    Post subject:
Reply with quote

How do you get "Retrieving matched duplicate records" out of this:
42 9876 7654
42 9876 5432
43 7654 9876
43 7654 5432
44 5432 9876
44 5432 7654
?
Define the rules for your "match".
Back to top
View user's profile Send private message
Huzefa

New User


Joined: 05 Dec 2006
Posts: 85
Location: Bangalore

PostPosted: Wed Apr 11, 2007 6:36 pm    Post subject:
Reply with quote

Sorry the desceiption above is wrong

File1
Key Value
42 9876
42 7654
42 5432

File2
Key Value
42 9876
42 7654
42 5432

Output expected
42 9876 7654
42 9876 5432
42 7654 9876
42 7654 5432
42 5432 9876
42 5432 7654

Sorry for the mistake
Back to top
View user's profile Send private message
William Thompson

Global Moderator


Joined: 18 Nov 2006
Posts: 3158
Location: Tucson AZ

PostPosted: Wed Apr 11, 2007 6:53 pm    Post subject:
Reply with quote

William Thompson wrote:
How do you get "Retrieving matched duplicate records" out of this:
42 9876 7654
42 9876 5432
42 7654 9876
42 7654 5432
42 5432 9876
42 5432 7654
?
Define the rules (using words and sentences) for your "match".
Back to top
View user's profile Send private message
Huzefa

New User


Joined: 05 Dec 2006
Posts: 85
Location: Bangalore

PostPosted: Wed Apr 11, 2007 7:21 pm    Post subject:
Reply with quote

If the key in file1 matches with the one or more records in file2 then display the key of file1 with the combination of value in file2

ie if file1 has a key 42 and value 10
file 2 has 2 records with key 42 but different values. then we need to display

file1_key(42) file1_value(10) file2_value
file1_key(42) file1_value(10) file2_value

Does this explain....
Back to top
View user's profile Send private message
William Thompson

Global Moderator


Joined: 18 Nov 2006
Posts: 3158
Location: Tucson AZ

PostPosted: Wed Apr 11, 2007 9:00 pm    Post subject:
Reply with quote

Not being much of an EZT person - though it does have some nice key matching capabilities - I can't see how to do this without have the file inputting twice at the same time - or the original and a copy.

Keying off the first, read a record, scan the second for key matches, ignore if value equal and write if key equal and number not.
When the second file at ends (or key break if sorted) close and open the second file and repeat.
Back to top
View user's profile Send private message
Huzefa

New User


Joined: 05 Dec 2006
Posts: 85
Location: Bangalore

PostPosted: Wed Apr 11, 2007 9:21 pm    Post subject:
Reply with quote

I tried closing the file and re-opening it but that didn't work

Could you put a small code snippet of how u would do it where it is a PS file.
Back to top
View user's profile Send private message
William Thompson

Global Moderator


Joined: 18 Nov 2006
Posts: 3158
Location: Tucson AZ

PostPosted: Wed Apr 11, 2007 9:29 pm    Post subject:
Reply with quote

You got to realize that there is no open/close in EZT and ps files can't be repositioned.
Like I said before, you have to approach this from a different direction.
Back to top
View user's profile Send private message
superk

Moderator Team Head


Joined: 26 Apr 2004
Posts: 4650
Location: Raleigh, NC, USA

PostPosted: Wed Apr 11, 2007 11:09 pm    Post subject: Re: Retrieving matched duplicate records
Reply with quote

Both this and the other post sound right up the alley for a DFSORT process for record matching, providing that Huzefa has DFSORT available.
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 -> CA Products All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
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 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
No new posts Merge 2 records sancraig16 SYNCSORT 19 Tue Mar 27, 2018 8:17 pm
No new posts Copy set of records based on condition krish.deepu SYNCSORT 2 Thu Mar 08, 2018 11:39 am

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