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] HELP - Trying to merger files with MORE command

Read-Only Read-Only Topic
Go
Search
Notify
Tools
[CLOSED] HELP - Trying to merger files with MORE command
 Login/Join
 
Master
posted
I am trying to put together a prototype MORE Concatenation with the CAR file for
a later coding problem. I've looked at the techsupport and it is deficient with
an example for a nonexistent EXPERSON file.

Here is what I have so far...

I have created the 2 hold files I like to merge for my report.

 
TABLE FILE CAR
SUM SALES
BY COUNTRY
ON TABLE HOLD AS C1
END
-RUN

?FF C1
-RUN

TABLE FILE CAR
SUM DC
BY COUNTRY
ON TABLE HOLD AS C2
END
-RUN

?FF C2
-RUN


and my Master defintions look like this:

quote:

FILENAME= C1
COUNTRY E01 A10
SALES E02 I6

FILENAME= C2
COUNTRY E01 A10
DEALER_COST E02 D7


Now I understand that I need to create 1 or more virtual fields
but this iw where I got lost.

I'm trying to come up with a request like:

TABLE FILE C1
SUM
SALES
DEALER_COST
BY COUNTRY
MORE
FILE C2
END

Any insights that anyone can provide, I would appreciate it.

Thanks!

This message has been edited. Last edited by: <Kathryn Henning>,


Tomsweb
WebFOCUS 8.1.05M, 8.2.x
APP Studio, Developer Studio, InfoAssist, Dashboards, charts & reports
Apache Tomcat/8.0.36
 
Posts: 573 | Location: Baltimore, MD | Registered: July 06, 2006Report This Post
Expert
posted Hide Post
The fields from C2 must match the fields from C1.

So Dealer Code should be I6 or Sales should be D7.

Also the field names need to be the same.

What happens with the TABLE FILE MORE, is that the TABLE FILE request for C1 is used in the C2 part. If the field names don't exist it will error.


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
Virtuoso
posted Hide Post
Untested, but if you add these virtual fields it should start working:
DEFINE FILE C1
  DEALER_COST/D7 = 0;
END
DEFINE FILE C2
  SALES/I6 = 0;
END

TABLE FILE C1
SUM
SALES
DEALER_COST
BY COUNTRY
MORE
FILE C2
END


WebFOCUS 8.1.03, Windows 7-64/2008-64, IBM DB2/400, Oracle 11g & RDB, MS SQL-Server 2005, SAP, PostgreSQL 11, Output: HTML, PDF, Excel 2010
: Member of User Group Benelux :
 
Posts: 1669 | Location: Enschede, Netherlands | Registered: August 12, 2010Report This Post
Platinum Member
posted Hide Post
 
Posts: 165 | Registered: September 29, 2008Report This Post
Master
posted Hide Post
How about MATCH FILE ?


WebFOCUS 7.7.05 Windows, Linux, DB2, IBM Lotus Notes, Firebird, Lotus Symphony/OpenOffice. Outputs PDF, Excel 2007 (for OpenOffice integration), WP
 
Posts: 674 | Location: Guelph, Ontario, Canada ... In Focus since 1985 | Registered: September 28, 2010Report This Post
Master
posted Hide Post
Yes, you can concatenate flat files C1 and C2 with the MORE command:
APP PREPENDPATH IBISAMP
-*
SET ONLINE-FMT = STANDARD
-*
TABLE FILE CAR
SUM SALES
BY COUNTRY
ON TABLE HOLD AS C1
END
-RUN
-*
TABLE FILE CAR
SUM DEALER_COST
BY COUNTRY
ON TABLE HOLD AS C2
END
-RUN
-*
DEFINE FILE C1
 DEALER_COST/D7 = SALES;
END
-*
TABLE FILE C1 
PRINT DEALER_COST
BY    COUNTRY
ON TABLE HOLD AS TOM
MORE 
FILE C2
END
-RUN
-*
TABLE FILE TOM
PRINT DEALER_COST AS 'Combo,Amount'
BY    COUNTRY     AS 'Country'
END
-EXIT  

                 Combo                                                          
  Country        Amount                                                         
  -------        ------                                                         
  ENGLAND        12,000
                 37,853
  FRANCE              0
                  4,631
  ITALY          30,200
                 41,235
  JAPAN          78,030
                  5,512
  W GERMANY      88,190
                 54,563  

This message has been edited. Last edited by: David Briars,
 
Posts: 822 | Registered: April 23, 2003Report 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] HELP - Trying to merger files with MORE command

Copyright © 1996-2020 Information Builders