View previous topic :: View next topic
|
Author |
Message |
cool_cupid4u Warnings : 1 New User
Joined: 31 Dec 2006 Posts: 4 Location: Hyderabad
|
|
|
|
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 |
|
|
dick scherrer
Moderator Emeritus
Joined: 23 Nov 2006 Posts: 19244 Location: Inside the Matrix
|
|
|
|
Hello,
Information Builders (www.informationbuilders.com) can answer your technical questions and provide material. |
|
Back to top |
|
|
iknow
Active User
Joined: 22 Aug 2005 Posts: 411 Location: Colarado, US
|
|
|
|
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 |
|
|
cool_cupid4u Warnings : 1 New User
Joined: 31 Dec 2006 Posts: 4 Location: Hyderabad
|
|
|
|
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 |
|
|
superk
Global Moderator
Joined: 26 Apr 2004 Posts: 4652 Location: Raleigh, NC, USA
|
|
|
|
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 |
|
|
dick scherrer
Moderator Emeritus
Joined: 23 Nov 2006 Posts: 19244 Location: Inside the Matrix
|
|
|
|
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 |
|
|
h.dinesh
New User
Joined: 06 Dec 2006 Posts: 46 Location: Chennai
|
|
|
|
Hi,
Can you be more clear with your requirement by giving sample i/p and o/p?
Dinesh |
|
Back to top |
|
|
cool_cupid4u Warnings : 1 New User
Joined: 31 Dec 2006 Posts: 4 Location: Hyderabad
|
|
|
|
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 |
|
|
h.dinesh
New User
Joined: 06 Dec 2006 Posts: 46 Location: Chennai
|
|
|
|
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 |
|
|
pavankumarhassaji
New User
Joined: 20 Aug 2007 Posts: 11 Location: Canada
|
|
|
|
Hi,
In your data if the fields are alphabatic, instead of writing
Code: |
PRINT FIELD1 FIELD2 |
write
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 |
|
|
|