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     [CLOSED] MATCH FILE with MORE

Read-Only Read-Only Topic
Go
Search
Notify
Tools
[CLOSED] MATCH FILE with MORE
 Login/Join
 
Virtuoso
posted
The documentation indicates that MORE can be used with MATCH FILE; but does not indicate where to put the
AFTER MATCH HOLD ...
phrase, when the second or subsequent leg of the match involves "universal catenation" ("MORE") syntax.

In the example below, depending on whether one, both, or neither of the commented AFTER MATCH lines is active, I either get an error message, or no message but no HOLD file.
WHENCE HOLD MASTER
MATCH FILE CAR
  SUM SEATS BY COUNTRY
  IF COUNTRY EQ FRANCE
MORE
FILE CAR
 IF COUNTRY EQ JAPAN
RUN
FILE CAR
  SUM RCOST BY COUNTRY
  IF COUNTRY EQ ITALY
-*AFTER MATCH HOLD OLD-OR-NEW
MORE
FILE CAR
  IF COUNTRY EQ 'W GERMANY'
-*AFTER MATCH HOLD OLD-OR-NEW
END
? FILEDEF
WHENCE HOLD MASTER
?FF HOLD


Anyone?

This message has been edited. Last edited by: <Kathryn Henning>,
 
Posts: 1925 | Location: NYC | In FOCUS since 1983 | Registered: January 11, 2005Report This Post
Virtuoso
posted Hide Post
I think the AFTER MATCH HOLD must be specified on the second MATCH answer set (the one that begins right after the "RUN" statement):

MATCH FILE CAR
  SUM SEATS BY COUNTRY
  IF COUNTRY EQ FRANCE
MORE                         <-- MORE
FILE CAR
 IF COUNTRY EQ JAPAN
MORE                         <-- MORE
FILE CAR
  SUM RCOST BY COUNTRY
  IF COUNTRY EQ ITALY
RUN                          <-- RUN *
FILE CAR
  IF COUNTRY EQ 'W GERMANY'
AFTER MATCH HOLD OLD-OR-NEW  <-- HOLD
END


A good explanation can be found here .

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



Prod/Dev: WF Server 8008/Win 2008 - WF Client 8008/Win 2008 - Dev. Studio: 8008/Windows 7 - DBMS: Oracle 11g Rel 2
Test: Dev. Studio 8008 /Windows 7 (Local) Output:HTML, EXL2K.
 
Posts: 1533 | Registered: August 12, 2005Report This Post
Gold member
posted Hide Post
What Njsden did above works although The "SUM RCOST BY COUNTRY" line also needs to be moved down under the RUN.


WF: 8201, OS: Windows, Output: HTML, PDF, Excel
 
Posts: 78 | Registered: November 08, 2010Report This Post
Virtuoso
posted Hide Post
njsden: My problem is where to put the AFTER MATCH... in the second request, when it consistes of a series of sub-requests. Your example only has MORE in the first leg. MORE unions the results, extending the answer-set matrix "vertically". RUN extends it "horizontally", adding more data columns.

Clearly the AFTER MATCH HOLD... clause belongs somewhere in the second leg, telling MATCH how to merge the two internal matrices that it has formed up to that point. I tried placing it early (in the first sub-request), and late (in the final one), and neither works.

Placed early -- it generates an error message, and no HOLD file is created.
MATCH FILE CAR
 SUM SEATS BY COUNTRY
 IF COUNTRY EQ FRANCE
 MORE
 FILE CAR
 IF COUNTRY EQ JAPAN
 RUN
 FILE CAR
 SUM RCOST BY COUNTRY
 IF COUNTRY EQ ITALY
 MORE
 FILE CAR
 IF COUNTRY EQ 'W GERMANY'
 AFTER MATCH HOLD OLD-OR-NEW
 END
 0 ERROR AT OR NEAR LINE     15  IN PROCEDURE ADHOCRQ FOCEXEC *
 (FOC953)  INVALID STRUCTURE IN SUBREQUEST: MATCH               <--- 
 0 ERROR AT OR NEAR LINE     15  IN PROCEDURE ADHOCRQ FOCEXEC *
 (FOC953)  INVALID STRUCTURE IN SUBREQUEST: HOLD
 BYPASSING TO END OF COMMAND
 ? FILEDEF
 Lname        Device   Lrecl Recfm Append     Filename
 ============================================================


Placed late -- it generates no error message, but still no HOLD file is created.

MATCH FILE CAR
 SUM SEATS BY COUNTRY
 IF COUNTRY EQ FRANCE
 MORE
 FILE CAR
 IF COUNTRY EQ JAPAN
 RUN
 FILE CAR
 SUM RCOST BY COUNTRY
 IF COUNTRY EQ ITALY
 AFTER MATCH HOLD OLD-OR-NEW
 MORE
 FILE CAR
 IF COUNTRY EQ 'W GERMANY'
 END
 BYPASSING TO END OF COMMAND                 <---
 ? FILEDEF
 Lname        Device   Lrecl Recfm Append     Filename
 ============================================================



It looks like "you can't get there from here", using only MATCH FILE; will have to use TABLE ... HOLD first, that merge outputs with a 'simple' MATCH FILE, sans MORE.
 
Posts: 1925 | Location: NYC | In FOCUS since 1983 | Registered: January 11, 2005Report This Post
Platinum Member
posted Hide Post
Here is the link to the tech memo for MORE and MATCH file commands.MORE and MATCH

Hope this helps. I had to go back and read up on this myself..
Rhond


WebFOCUS & ReportCaster 8.1.05, 7.7.03 - AIX/LINUX, FOCUS 7.6.13 MVS, Output PDF, XLS-XLSX, DOCX and HTML
 
Posts: 146 | Location: Atlanta, GA | Registered: May 31, 2007Report This Post
Virtuoso
posted Hide Post
According to the documentation, you can use MORE for the OLD files but not for the NEW.
NFR?


Daniel
In Focus since 1982
wf 8.202M/Win10/IIS/SSA - WrapApp Front End for WF

 
Posts: 1980 | Location: Tel Aviv, Israel | Registered: March 23, 2006Report This Post
Virtuoso
posted Hide Post
No, Dan, it doesn't state that there is such a restriction. It's just that the only example given uses MORE only in the first ("OLD") leg of the merge.

It's clear to me that someone took a page of documentation of MORE written for TABLE ... END, and retrofitted coverage of MATCH, without paying attention to the issue of what happens in the subsequent portion (or portions) of a MATCH request. And similarly for the implementation of MORE in MATCH.

So I see it as a promise unfulfilled -- a bug report -- not a New Feature request.

The obvious work-around is to pre-assemble the data for the second (and subsequent0 legs, using TABLE + MORE + HOLD; and then perform a merge with MATCH, restricting use of MORE (if at all) to the first leg.


- Jack Gross
WF through 8.1.05
 
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     [CLOSED] MATCH FILE with MORE

Copyright © 1996-2020 Information Builders