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.
I have a report where it takes several steps to get to a hold file. Then I have to create another several steps and then get to a second hold file. I need to append my hold1 and hold2 files together. Is the best way to do this is to use the more or to use the filedef? And where do I put this in the code?
malindaThis message has been edited. Last edited by: Malinda,
WebFOCUS 7.6.11 Windows all output (Excel, HTML, PDF)
SET HOLDLIST=PRINTONLY
SET HOLDFORMAT=ALPHA
-RUN
TABLE FILE CAR
SUM
SALES/D8
COMPUTE GROUP1/A16 = COUNTRY;
BY COUNTRY NOPRINT
WHERE SALES GT 10000
ON TABLE HOLD AS H001
END
-RUN
DEFINE FILE GGORDER
SALES/D8 = QUANTITY * UNIT_PRICE;
END
-RUN
TABLE FILE GGORDER
SUM SALES
COMPUTE GROUP1/A16 = PRODUCT_DESCRIPTION;
BY PRODUCT_DESCRIPTION NOPRINT
WHERE QUANTITY LT 40
ON TABLE HOLD AS H002
END
-RUN
TABLE FILE H001
PRINT *
ON TABLE HOLD AS H100
MORE
FILE H002
END
-RUN
TABLE FILE H100
PRINT
SALES
BY GROUP1
END
-RUN
MORE FILE ... must be the last two statements before the END statement.
Francis
Give me code, or give me retirement. In FOCUS since 1991
Production: WF 7.7.05M, Dev Studio, BID, MRE, WebSphere, DB2 / Test: WF 8.1.05M, App Studio, BI Portal, Report Caster, jQuery, HighCharts, Apache Tomcat, MS SQL Server
TABLE FILE CAR
PRINT COUNTRY CAR MODEL SALES
WHERE COUNTRY EQ 'ENGLAND'
ON TABLE HOLD AS APPND FORMAT ALPHA
END
FILEDEF APPND DISK appnd.ftm (APPEND
TABLE FILE CAR
PRINT COUNTRY CAR MODEL SALES
WHERE COUNTRY EQ 'FRANCE'
ON TABLE HOLD AS APPND FORMAT ALPHA
END
FILEDEF APPND DISK appnd.ftm
TABLE FILE APPND
PRINT *
END
It does rely on the second TABLE FILE's field matching the firsts.
OR two hold format focus and a USE command. Lots of different ways for this one.
Regards,
Darin
In FOCUS since 1991 WF Server: 7.7.04 on Linux and Z/OS, ReportCaster, Self-Service, MRE, Java, Flex Data: DB2/UDB, Adabas, SQL Server Output: HTML,PDF,EXL2K/07, PS, AHTML, Flex WF Client: 77 on Linux w/Tomcat
Posts: 2298 | Location: Salt Lake City, Utah | Registered: February 02, 2007
Or, if using HOLDFORMAT ALPHA, you can use an OS command to append or concatenate the two files.
TABLE FILE CAR
PRINT COUNTRY CAR MODEL SALES
WHERE COUNTRY EQ 'ENGLAND'
ON TABLE HOLD FORMAT ALPHA
END
TABLE FILE CAR
PRINT COUNTRY CAR MODEL SALES
WHERE COUNTRY EQ 'FRANCE'
ON TABLE SAVE
END
-RUN
-UNIX cat save.ftm >> hold.ftm
Or if using HOLDFORMAT BINARY:
TABLE FILE CAR
PRINT COUNTRY CAR MODEL SALES
WHERE COUNTRY EQ 'ENGLAND'
ON TABLE SET HOLDFORMAT BINARY
ON TABLE HOLD
END
FILEDEF HOLD DISK hold.ftm ( LRECL 56 RECFM F APPEND
TABLE FILE CAR
PRINT COUNTRY CAR MODEL SALES
WHERE COUNTRY EQ 'FRANCE'
ON TABLE SAVB AS HOLD
END
-RUN
In FOCUS since 1985. Prod WF 8.0.08 (z90/Suse Linux) DB (Oracle 11g), Self Serv, Report Caster, WebServer Intel/Linux.
Posts: 975 | Location: Oklahoma City | Registered: October 27, 2006
There you go Malinda! Many options to choose from.
Personally, I prefer FILEDEF (APPEND as it allows me to create and append to my target file upon retrieving data from the database; other valid approaches usually require reading from your database and putting your data in a HOLD file (repeating those 2 steps as many times as data sources you need to concatenate) and later reading all your HOLD files in order to concatenate them. This may not be significant if you're dealing with "small" sets of data but if you see yourself creating "big" HOLD files (because your business rules report so require) then creating those HOLD files and querying them again so that they can be concatenated at the end may impact performance. In addition, when using FILEDEF (APPEND you are not limited to ALPHA format; BINARY works just as fine.
Every feature and functionality has its place (IBI would have never implemented them otherwise ). Just pick the one that better suits your needs.This message has been edited. Last edited by: njsden,