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] Help! Routine to dump data from focus, store in flat file.

Read-Only Read-Only Topic
Go
Search
Notify
Tools
[SOLVED] Help! Routine to dump data from focus, store in flat file.
 Login/Join
 
Master
posted
Trying to create a routine that will dump all of the data from a database and store it in file. This is a flat file, and I want the data to be stored in text format.

I've been testing it and it does not seem to work. Can anyone suggest what might be wrong with it?

 
FILEDEF CR3NTS DISK K:\CR3NTS.txt
-RUN

TABLE FILE WXYZDOGS
PRINT *

ON TABLE SAVE AS CR3NTS FORMAT ALPHA
ON TABLE SET PAGE NOPAGE
END
-RUN

SET HTMLFORMTYPE=TXT

-HTMLFORM BEGIN
!IBI.FIL.CR3NTS;
-HTMLFORM END

-RUN
-EXIT

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


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
Master
posted Hide Post
!IBI.FIL might not be a bad way to check the file contents, unless the records are very long, and you are blowing through some max length for -HTMLFORM.

Did you go to the K: and try opening the file in Notepad?
 
Posts: 822 | Registered: April 23, 2003Report This Post
Virtuoso
posted Hide Post
Just as a sanity check; is K:\CR3NTS.txt a path on the server?


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
Virtuoso
posted Hide Post
Tom,
What doesn't work?
No records?
Also, what type of file is WXYZDOGS?
Also, ON TABLE SAVE does not need FORMAT ALPHA: SAVE always produces alpha.
How about adding SET MSG=ON before your TABLE request to see how many records were extracted?
Lastly, if you are using PRINT * to dump your data into a flat file, I would suggest you use TABLEF.


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
Expert
posted Hide Post
I didn't expect it to, but this works, it displays the saved file in an HTML page:

TABLE FILE CAR
PRINT
*
ON TABLE SAVE AS CR3NTS FORMAT ALPHA
END
-RUN

SET HTMLFORMTYPE=TXT
-RUN

-HTMLFORM BEGIN
!IBI.FIL.CR3NTS;
-HTMLFORM END


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
 
Posts: 10577 | Location: Toronto, Ontario, Canada | Registered: April 27, 2005Report This Post
Master
posted Hide Post
quote:
[solved] Originally posted by Tomsweb:
Trying to create a routine that will dump all of the data from a database and store it in file. This is a flat file, and I want the data to be stored in text format.

I've been testing it and it does not seem to work. Can anyone suggest what might be wrong with it?

 
FILEDEF CR3NTS DISK K:\CR3NTS.txt
-RUN

TABLE FILE WXYZDOGS
PRINT *

ON TABLE SAVE AS CR3NTS FORMAT ALPHA
ON TABLE SET PAGE NOPAGE
END
-RUN

SET HTMLFORMTYPE=TXT

-HTMLFORM BEGIN
!IBI.FIL.CR3NTS;
-HTMLFORM END

-RUN
-EXIT


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
  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] Help! Routine to dump data from focus, store in flat file.

Copyright © 1996-2020 Information Builders