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
 

 

Eliminate Duplicate records in FOCUS

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> All Other Mainframe Topics
View previous topic :: :: View next topic  
Author Message
cool_cupid4u
Warnings : 1

New User


Joined: 31 Dec 2006
Posts: 4
Location: Hyderabad

PostPosted: Tue Feb 06, 2007 2:07 pm    Post subject: Eliminate Duplicate records in FOCUS
Reply with quote

Hi,
Can anyone help me in eliminating duplicate records using FOCUS(Report genration language).

Or it wud b great if anyone can provide online material for FOCUS.
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: Tue Feb 06, 2007 10:23 pm    Post subject:
Reply with quote

Hello,

Information Builders (www.informationbuilders.com) can answer your technical questions and provide material.
Back to top
View user's profile Send private message
iknow

Active User


Joined: 22 Aug 2005
Posts: 413
Location: Colarado, US

PostPosted: Wed Feb 07, 2007 3:59 pm    Post subject: Re: Eliminate Duplicate records in FOCUS
Reply with quote

Hi,

In order to eliminate duplicates in FOCUS, you need to make use of WRITE statement in FOCUS.

I am attaching you some reference FOCUS manuals.

Please let me know if you need any other help.


Attachment Removed. Copyrighted Material
Back to top
View user's profile Send private message
cool_cupid4u
Warnings : 1

New User


Joined: 31 Dec 2006
Posts: 4
Location: Hyderabad

PostPosted: Wed Feb 07, 2007 9:41 pm    Post subject:
Reply with quote

Hi
Thanks for the manuals.

I am still facing prob regarding the duplicate elimination.
I have a PS file with 20 records. I need to eliminate duplicate recs. For this I wud b using first 10 bytes as unique field.so how can i eliminate dup recs.
Back to top
View user's profile Send private message
superk

Moderator Team Head


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

PostPosted: Wed Feb 07, 2007 9:46 pm    Post subject: Re: Eliminate Duplicate records in FOCUS
Reply with quote

iknow, the material in the FOCUS.zip file says that its copyrighted. You can't legally post or distribute copyrighted material without the written consent of the publisher.

That content needs to be removed.
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: Wed Feb 07, 2007 10:34 pm    Post subject:
Reply with quote

Hello,

If you cannot find what you need in focus, you could sort the file removing duplicates. Look in the DFSORT forum and you will find multiple posts on how to do this.
Back to top
View user's profile Send private message
h.dinesh

New User


Joined: 06 Dec 2006
Posts: 46
Location: Chennai

PostPosted: Mon Feb 12, 2007 2:48 pm    Post subject:
Reply with quote

Hi,

Can you be more clear with your requirement by giving sample i/p and o/p?


Dinesh
Back to top
View user's profile Send private message
cool_cupid4u
Warnings : 1

New User


Joined: 31 Dec 2006
Posts: 4
Location: Hyderabad

PostPosted: Tue Feb 20, 2007 5:38 pm    Post subject:
Reply with quote

Hi Dinesh

Below is the file wherein i need to remove the duplicates..

7176042059 77452705200702152007021520070216RRZ08
7176042059 77452705200702152007021520070216RRZ08
7176042059 77452705200702152007021520070216RRZ08

The resultant file should have only one Record. At present I am eliminating the Duplicates in JCL using the SORT FIELDS cond.

I want to know if we can accomplish the same using FOCUS.

Thanks.
Back to top
View user's profile Send private message
h.dinesh

New User


Joined: 06 Dec 2006
Posts: 46
Location: Chennai

PostPosted: Tue Feb 20, 2007 6:17 pm    Post subject:
Reply with quote

Hi,

As per your previous post the first 10 bytes are unique and remaining have duplicates

Quote:
I have a PS file with 20 records. I need to eliminate duplicate recs. For this I wud b using first 10 bytes as unique field.so how can i eliminate dup recs.


But your example shows all nos. same for 1st 10 bytes...

Quote:
7176042059 77452705200702152007021520070216RRZ08
7176042059 77452705200702152007021520070216RRZ08
7176042059 77452705200702152007021520070216RRZ08


Anyway, I assume that 1st 10 bytes are unique - FIELD1 and remaining as FIELD2. You may use the following TABLE command to eliminate duplicates in FIELD2.

Code:
TABLE FILE <FILE NAME>
PRINT FIELD1
BY FIELD2
ON TABLE SAVE AS <SAVE FILE NAME>
END


Please let me know if this is what you want.

Dinesh
Back to top
View user's profile Send private message
pavankumarhassaji

New User


Joined: 20 Aug 2007
Posts: 11
Location: Canada

PostPosted: Mon Apr 14, 2008 6:09 pm    Post subject:
Reply with quote

Hi,

In your data if the fields are alphabatic, instead of writing

Code:
PRINT FIELD1 FIELD2


write

Code:
SUM FIELD1 FIELD2


it returns the last occurance of the field, eliminating the duplicates.

If the filelds are numeric, change the fields to alphabatic by using DEFINE clause.

Thanks,
Pavan Hassaji.
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 -> All Other Mainframe Topics All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts Using ICETOOL, how we can seperate th... bshkris SYNCSORT 5 Tue May 09, 2017 8:33 pm
No new posts Check if any Detail records and extra... V S Amarendra Reddy SYNCSORT 19 Mon May 08, 2017 8:54 pm
No new posts Join giving more records than expected Danielle.Filteau SYNCSORT 2 Thu Mar 09, 2017 3:28 am
No new posts TSO or command line utility to genera... kishpra JCL & VSAM 3 Thu Mar 09, 2017 1:11 am
No new posts Extract set of records matching on ac... bhaskar_kanteti DFSORT/ICETOOL 3 Mon Mar 06, 2017 7:19 am


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