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] Saving file to folder with space

Read-Only Read-Only Topic
Go
Search
Notify
Tools
[CLOSED] Saving file to folder with space
 Login/Join
 
Silver Member
posted
I'm trying to save a file to a location on a network drive. This location has a space in the name of a certain folder. I got the file to save successfully bby putting the whole path in double quotes but now they want the date on the end of the file and it's causing issues with it saving. I've pasted what I have below but it doesn't work. I even tried putting double quotes around the whole thing and still no luck. Any ideas?

-SET &DTSTAMP = EDIT(&MDYY,'99999999') ;
-SET &OUTFILE = 'D:\IBI\EXPORTS\LISA\mark tripp' || &DTSTAMP || '.txt';
FILEDEF RESULTS DISK &OUTFILE

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


Webfocus 8.1.0.5
Windows 2008
Excel,PDF,HTML
 
Posts: 32 | Registered: February 28, 2011Report This Post
Expert
posted Hide Post
Try with quotes in the string.
-SET &OUTFILE = '"D:\ibi\mark tripp' || &DTSTAMP || '.txt"';


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
Silver Member
posted Hide Post
Thanks for your response but that didn't work either. It returned the error of "ERROR WRITING OUTPUT FILE: RESULTS" I can get it to work just fine on a location where there's no space in the path but the owners dont want to remove the space in their folder.


Webfocus 8.1.0.5
Windows 2008
Excel,PDF,HTML
 
Posts: 32 | Registered: February 28, 2011Report This Post
Platinum Member
posted Hide Post
Hi MikeW,

I had to put double quotes around the OUTFILE variable to get the filedef to work.

FILEDEF RESULTS DISK "&OUTFILE"

Let me know if that helps.

Jim


WebFocus 8.201M, Windows, App Studio
 
Posts: 227 | Location: Lincoln Nebraska | Registered: August 12, 2008Report This Post
Silver Member
posted Hide Post
I still got the same error, I tried the quotes around the amper variable like you suggested. Frowner


Webfocus 8.1.0.5
Windows 2008
Excel,PDF,HTML
 
Posts: 32 | Registered: February 28, 2011Report This Post
Platinum Member
posted Hide Post
Is the space just in the file name(as in your example) or is there also a space in the folder name?


WebFocus 8.201M, Windows, App Studio
 
Posts: 227 | Location: Lincoln Nebraska | Registered: August 12, 2008Report This Post
Expert
posted Hide Post
Try it with .EVAL. Also, make sure you have write access to the disk, and, the path is correct. And, you don't need the EDIT.

This worked for me:

  
APP PREPENDPATH IBISAMP
-RUN
-SET &ECHO=ALL;
SET SHOWBLANKS = ON
-RUN
-SET &OUTFILE = 'D:\ibi\64bit\apps\bi_adv\tflynn' || '&MDYY.EVAL' || '.txt';
FILEDEF RESULTS DISK &OUTFILE
? FILEDEF
-RUN
TABLE FILE CAR
PRINT
  COUNTRY  
  CAR  
  MODEL  
  COUNTRY  
  CAR  
  MODEL  
 ON TABLE SAVE AS RESULTS
END
-EXIT

and created: tflynn03102011.txt


Tom Flynn
WebFOCUS 8.1.05 - PROD/QA
DB2 - AS400 - Mainframe
 
Posts: 1972 | Location: Centennial, CO | Registered: January 31, 2006Report This Post
Expert
posted Hide Post
-SET &OUTFILE = 'C:\ibi\apps\baseapp\test test' | &MDYY | '.txt';
FILEDEF RESULTS DISK "&OUTFILE"
-RUN
-WRITE RESULTS XXXXXXXXXXX

This works in my Windows environment.

You have to make sure that "D:\ibi\" actually exists on the server where WebFOCUS runs.


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
Expert
posted Hide Post
Can you try one of the examples with -SET &ECHO=ALL;

and post the results.


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
  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] Saving file to folder with space

Copyright © 1996-2020 Information Builders