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     Need to create a .txt file

Read-Only Read-Only Topic
Go
Search
Notify
Tools
Need to create a .txt file
 Login/Join
 
Silver Member
posted
Does anyone know how I can create a file with the extension of txt from WebFocus? I just need a file with today's date for another application and they insist the extension has to be txt.

Thanks,
Jim

UNIX
Oracle
WebFocus 7.13 & ETL 7.13
 
Posts: 43 | Location: San Jose, California. | Registered: July 18, 2005Report This Post
Expert
posted Hide Post
Do you want to create the text file via a ON TABLE SAVE or HOLD? If so, simply add a FILEDEF before the TABLE request:

FILEDEF S001 DISK demo/s001.txt
-RUN

TABLE FILE CAR
PRINT MODEL
BY COUNTRY
ON TABLE SAVE AS S001
END
-RUN

In my example, the SAVE file is created in an APP folder called DEMO. you can alternatively code your FILEDEF like this to create the file in a particular folder:

FILEDEF S001 DISK C:\windows\temp\s001.txt
-RUN


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
Virtuoso
posted Hide Post
Use FILEDEF to define the file you are wanting to save the information to and call it what you want. Of course the filedef needs to point to somewhere the application has access to.

FILEDEF XYZ DISK D:\UNO\WEBDATA\XYZ.TXT

TABLE....
....
ON TABLE SAVE AS XYZ
END


Leah
 
Posts: 1317 | Location: Council Bluffs, IA | Registered: May 24, 2004Report This Post
Guru
posted Hide Post
In the FILEDEF statement you tell it where to save it and what the name you want to save it as.

FILEDEF TIMER DISK /edadata/timer.txt

Then save it format LOTUS

ON TABLE SAVE AS TIMER FORMAT LOTUS


Glenda

In FOCUS Since 1990
Production 8.2 Windows
 
Posts: 301 | Location: Galveston, Texas | Registered: July 07, 2004Report This Post
Virtuoso
posted Hide Post
I remembered this issue was brought up before

It's interesting to see what that brought.

https://forums.informationbuilders.com/eve/forums/a/tpc/...691025312#4691025312

As always, many solutions...




Frank

prod: WF 7.6.10 platform Windows,
databases: msSQL2000, msSQL2005, RMS, Oracle, Sybase,IE7
test: WF 7.6.10 on the same platform and databases,IE7

 
Posts: 2387 | Location: Amsterdam, the Netherlands | Registered: December 03, 2006Report This Post
Master
posted Hide Post
There's always the option if using the OS to copy/rename the file.

TABLE FILE CAR
PRINT *
ON TABLE SAVE
END
-RUN
-* copy file
-UNIX cp save.ftm pathname1/save.txt
-* move/rename file
-UNIX mv save.ftm pathname2/save.txt


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, 2006Report This Post
Silver Member
posted Hide Post
Thanks everyone, this is exactly what I was looking for. Now I have 2 methods to choose from.

Jim
 
Posts: 43 | Location: San Jose, California. | Registered: July 18, 2005Report This Post
Virtuoso
posted Hide Post
If you want to do it the cool way:
APP MAP outdir C:\temp
EX -LINES 1 EDAPUT ,outdir/output.txt ,C,FILE,&YYMD


"There is no limit to what you can achieve ... if you don’t care who gets the credit." Roger Abbott
 
Posts: 1102 | Location: Toronto, Ontario | Registered: May 26, 2004Report This Post
Virtuoso
posted Hide Post
quote:
Originally posted by dhagen:
If you want to do it the cool way:
APP MAP outdir C:\temp
EX -LINES 1 EDAPUT ,outdir/output.txt ,C,FILE,&YYMD



That looks cool, but what is the result, what are the C, FILE etc for?




Frank

prod: WF 7.6.10 platform Windows,
databases: msSQL2000, msSQL2005, RMS, Oracle, Sybase,IE7
test: WF 7.6.10 on the same platform and databases,IE7

 
Posts: 2387 | Location: Amsterdam, the Netherlands | Registered: December 03, 2006Report This Post
Virtuoso
posted Hide Post
The result is a file called C:\temp\output.txt that contains todays date. It's been so long since I've gone over this command I cannot remember what anything past the filename is for. I just use it for old time sake.

I use this command a lot when I need to create a fex or master on the fly that I need to keep around ... as well as other things.


"There is no limit to what you can achieve ... if you don’t care who gets the credit." Roger Abbott
 
Posts: 1102 | Location: Toronto, Ontario | Registered: May 26, 2004Report 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     Need to create a .txt file

Copyright © 1996-2020 Information Builders