Focal Point Banner


As of December 1, 2020, Focal Point is retired and repurposed as a reference repository. We value the wealth of knowledge that's been shared here over the years. You'll continue to have access to this treasure trove of knowledge, for search purposes only.

Join the TIBCO Community
TIBCO Community is a collaborative space for users to share knowledge and support one another in making the best use of TIBCO products and services. There are several TIBCO WebFOCUS resources in the community.

  • From the Home page, select Predict: WebFOCUS to view articles, questions, and trending articles.
  • Select Products from the top navigation bar, scroll, and then select the TIBCO WebFOCUS product page to view product overview, articles, and discussions.
  • Request access to the private WebFOCUS User Group (login required) to network with fellow members.

Former myibi community members should have received an email on 8/3/22 to activate their user accounts to join the community. Check your Spam folder for the email. Please get in touch with us at community@tibco.com for further assistance. Reference the community FAQ to learn more about the community.


Focal Point    Focal Point Forums  Hop To Forum Categories  WebFOCUS/FOCUS Forum on Focal Point     [SOLVED] Finding Duplicates

Read-Only Read-Only Topic
Go
Search
Notify
Tools
[SOLVED] Finding Duplicates
 Login/Join
 
Member
posted
For example, I have a data base that may have duplicates.

Record Key Tag # Data
--------- ----- --------
1 A xyz
2 A 123
3 B abc
4 C abc
5 C 789
6 D 555
7 C 999



I want to print out a report that shows only duplicates in the Tag #. I know there's a command for looking at the next or previous record, but I can't remember it or its syntax. In the above example, I would like a report that looks like this:

Record Key Tag # Data
--------- ----- --------
1 A xyz
2 A 123
4 C abc
5 C 789
7 C 999

Any suggestions will be greatly appreciated.

Thanks,
carl

This message has been edited. Last edited by: Kerry,


Carl

FOCUS 7.1.6 on Windows XP
Output: Excel, HTML, PDF
 
Posts: 27 | Registered: October 19, 2007Report This Post
Expert
posted Hide Post
How about this....

EX -LINES 8 EDAPUT MASTER,TESTDATA,CV,FILE
FILENAME=TESTDATA, SUFFIX=FIX,$
SEGNAME=TEST_DATA, $
  FIELD=Key ,ALIAS=  ,I9 ,A1,$
  FIELD=Fill1, ALIAS= ,A1, A1, $
  FIELD=Tag ,ALIAS=  ,A1 ,A1,$
  FIELD=Fill1, ALIAS= ,A1, A1, $
  FIELD=Data,ALIAS=  ,A3 ,A3,$

EX -LINES 8 EDAPUT FOCTEMP,TESTDATA,CV,FILE
1 A xyz
2 A 123
3 B abc
4 C abc
5 C 789
6 D 555
7 C 999

-RUN

FILEDEF TESTDATA DISK testdata.ftm (LRECL 7

DEFINE FILE TESTDATA
 CntTag/I9 = 1 ;
END
TABLE FILE TESTDATA
 SUM CntTag    NOPRINT
 BY Tag        NOPRINT
 PRINT Key
       Tag
       Data
 BY Tag        NOPRINT
 BY Key        NOPRINT
WHERE TOTAL CntTag GT 1
END


Waz...

Prod:WebFOCUS 7.6.10/8.1.04Upgrade:WebFOCUS 8.2.07OS:LinuxOutputs:HTML, PDF, Excel, PPT
In Focus since 1984
Pity the lost knowledge of an old programmer!

 
Posts: 6347 | Location: 33°49'23.0"S, 151°11'41.0"E | Registered: October 31, 2006Report This Post
Gold member
posted Hide Post
Carl,

The command you are thinking of is the last command. you would use it as such:

dups/A1=IF KEY EQ LAST KEY THEN 'Y' ELSE 'N';  


If you use this. Make sure to stage the file in order before using the last command, otherwise you might not spot all your duplicates.


Eric Woerle
WF 7.6.7 Reportting Server
ETL 7.6.10
Dev Studio 7.6.7
 
Posts: 95 | Registered: July 31, 2007Report This Post
Member
posted Hide Post
Waz-

Although I think this would work, I think there is an easier solution. I know, because I've used it, and can't remember the command. (it must be an age thing). I'll try your solution, but I still hope someone will come up with a simplet solution.


Carl

FOCUS 7.1.6 on Windows XP
Output: Excel, HTML, PDF
 
Posts: 27 | Registered: October 19, 2007Report This Post
Member
posted Hide Post
Eric-

Thanks! This is exactly what I was looking for. I hate it when I don't use a command for a year or two and forget it. Confused


Carl

FOCUS 7.1.6 on Windows XP
Output: Excel, HTML, PDF
 
Posts: 27 | Registered: October 19, 2007Report This Post
Member
posted Hide Post
Waz-

Thanks for trying.

Eric -

thanks for the solution - it does exactly what I want. What I did was create the Duplicates list, did a SUM on it, then did a match file against all the records so I could pick up the first record in a set of dups.

thanks


Carl

FOCUS 7.1.6 on Windows XP
Output: Excel, HTML, PDF
 
Posts: 27 | Registered: October 19, 2007Report This Post
  Powered by Social Strata  

Read-Only Read-Only Topic

Focal Point    Focal Point Forums  Hop To Forum Categories  WebFOCUS/FOCUS Forum on Focal Point     [SOLVED] Finding Duplicates

Copyright © 1996-2020 Information Builders