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] ONLY GETTING RESULT FROM 1ST TABLE MATCHING OLD OR NEW

Read-Only Read-Only Topic
Go
Search
Notify
Tools
[SOLVED] ONLY GETTING RESULT FROM 1ST TABLE MATCHING OLD OR NEW
 Login/Join
 
Gold member
posted
I'm trying to do a match to retrieve rows from two tables. I only get the rows from the 1st table. I don't want the rows to merge to one I want multiple rows. Example:

MATCH FILE FROMLOC
  PRINT
ACCTNUM
BY FROMLOC AS 'LOC'
END
RUN
FILE TOLOC
  PRINT
  ACCTNUM
BY  TOLOC AS 'LOC'
AFTER MATCH HOLD AS HEADLOC OLD-OR-NEW


Now in file FROMLOC there is
ALB 1234
in TOLOC there is
CON 1234
I want the results of both, I want to have two rows in the hold table with two columns. What am i doing wrong?

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


WebFOCUS 7.6.2, MS Windows Server/______, Excel, PDF, HTML
 
Posts: 91 | Registered: May 15, 2008Report This Post
Gold member
posted Hide Post
I figured it out. Match is so powerful if you under it. SOLVED.
MATCH FILE FROMLOC
BY ACCTNUM
BY FROMLOC AS 'LOC'
RUN
FILE TOLOC
BY ACCTNUM
BY  TOLOC AS 'LOC'
AFTER MATCH HOLD AS HEADLOC OLD-OR-NEW
END


WebFOCUS 7.6.2, MS Windows Server/______, Excel, PDF, HTML
 
Posts: 91 | Registered: May 15, 2008Report This Post
Platinum Member
posted Hide Post
Well, as always in FOCUS code, there often many ways to achieve a similar result.
If I understand your explanation, then something along these lines would have been another way of doing it:

DEFINE FILE FROMLOC
LOC/A4 = FROMLOC;
END

DEFINE FILE TOLOC
LOC/A4 = TOLOC;
END

TABLE FILE FROMLOC
BY ACCTNUM
BY LOC
MORE
FILE TOLOC
END


WebFOCUS 8.2.06 mostly Windows Server
 
Posts: 195 | Location: Johannesburg, South Africa | Registered: September 13, 2008Report This Post
Platinum Member
posted Hide Post
The BY field format may be the culprit.


WF 7.7.02 on Windows 7
Teradata
HTML,PDF,EXCEL,AHTML
 
Posts: 165 | Registered: September 29, 2008Report This Post
Gold member
posted Hide Post
Twanette, I used your sample code and it worked. I've never used the MORE command, but it is fabulous and much easier than the MATCH. Thanks for sharing.


WebFOCUS 7.6.2, MS Windows Server/______, Excel, PDF, HTML
 
Posts: 91 | Registered: May 15, 2008Report 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] ONLY GETTING RESULT FROM 1ST TABLE MATCHING OLD OR NEW

Copyright © 1996-2020 Information Builders