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     Reclassifying Data Based on a Comparison

Read-Only Read-Only Topic
Go
Search
Notify
Tools
Reclassifying Data Based on a Comparison
 Login/Join
 
Silver Member
posted
I have 2 groups of data, the first with companies having public bonds and the second with companies having private bonds.

If a company is listed in both public and private bond groups I need to reclassify the private bonds as 'public' or in other words show the company only as a public company.

What is the best way to compare my 2 groups to identify companies having both public and private bonds and then dumping these companies into the public bucket?

I've attempted to do this, but I lose either the public or private 'bucket'. I'd appreciate any help with this, thank you!

vickie
 
Posts: 37 | Location: Springfield, MA | Registered: December 03, 2004Report This Post
Expert
posted Hide Post
Hmmmm ... "best" way you say? Well that depends upon your source data of course and the RDBMS in which it is held. If it is SQL based then I would be inclined to use SQL passthru for efficiency.

However, if you want a pure FOCUS solution (not necessarily the "best") then try this code
TABLE FILE CAR
BY COUNTRY
WHERE COUNTRY EQ 'ENGLAND'
ON TABLE HOLD AS PUBLIC FORMAT FOCUS INDEX COUNTRY
END

TABLE FILE CAR
BY COUNTRY
ON TABLE HOLD AS PRIVATE FORMAT FOCUS INDEX COUNTRY
END

DEFINE FILE PUBLIC
  BONDS/A9 = 'PUBLIC';
END
DEFINE FILE PRIVATE
  BONDS/A9 = 'PRIVATE';
END

MATCH FILE PUBLIC
SUM BONDS 
BY COUNTRY
RUN
FILE PRIVATE
SUM BONDS 
BY COUNTRY
AFTER MATCH HOLD AS BONDS OLD-OR-NEW
END
-RUN

DEFINE FILE BONDS
  TYPE/A9 = IF E02 NE '' THEN E02 ELSE E03;
END

TABLE FILE BONDS
PRINT TYPE
BY COUNTRY
END

The first two table requests are purely to provide some basic data. The important item is the MATCH processing. This provides a method of combining the output similar to using a UNION ALL.

Anyway, have a look at the code and see if it meets your needs.

T



In FOCUS
since 1986
WebFOCUS Server 8.2.01M, thru 8.2.07 on Windows Svr 2008 R2  
WebFOCUS App Studio 8.2.06 standalone on Windows 10 
 
Posts: 5694 | Location: United Kingdom | Registered: April 08, 2004Report This Post
Silver Member
posted Hide Post
Thanks, Tony. I'll try this. Actually do want pure FOCUS, 'best' or not, Smiler

vickie
 
Posts: 37 | Location: Springfield, MA | Registered: December 03, 2004Report This Post
Platinum Member
posted Hide Post
It would be more direct to just MATCH the names and find those that are both Public and Private.
MATCH FILE data
BY COMPANY
IF BOND EQ 'PUBLIC'
RUN
FILE data
BY COMPANY
IF BOND EQ 'PRIVATE'
ON TABLE HOLD AS OLD-AND-NEW
END
TABLE FILE HOLD
PRINT COMPANY <-these are the ones with both
END


Release 7.6.9
Windows
HTML
 
Posts: 226 | Registered: June 08, 2003Report This Post
Silver Member
posted Hide Post
That would do it. Then I could add back the companies that are only public for a complete listing of all companies with public or public and private bonds.

Thank you! vickie
 
Posts: 37 | Location: Springfield, MA | Registered: December 03, 2004Report This Post
Virtuoso
posted Hide Post
Something like this would classify all issuers without requireing MATCH:

DEFINE FILE BONDDATA
PRIVATE/I5= BOND_TYPE EQ 'PRIVATE';
PUBLIC /I5= BOND_TYPE EQ 'PUBLIC';
END
TABLE FILE BONDDATA
SUM PRIVATE NOPRINT
PUBLIC NOPRINT
COMPUTE COMP_TYPE/A8=
IF PRIVATE GT 0 AND PUBLIC EQ 0 THEN 'PRIVATE'
ELSE 'PUBLIC ';
BY COMPANY
END
 
Posts: 1925 | Location: NYC | In FOCUS since 1983 | Registered: January 11, 2005Report 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     Reclassifying Data Based on a Comparison

Copyright © 1996-2020 Information Builders