Focal Point
Save HOLD file problem

This topic can be found at:
https://forums.informationbuilders.com/eve/forums/a/tpc/f/7971057331/m/9881062251

February 02, 2006, 06:26 PM
Matthew
Save HOLD file problem
I am trying to save a file to a network path (UNC) so that others can access it to extract the data. I beleive the problem is that the path name has both a '$' and spaces in it and I believe one or both is causing my problem. The code I am using is:
-SET &FULLPATH = '\\Directory name\reports$'
-SET &FILENAME = '\' | 'Filename.xls'
-SET &FULLFILE = &FULLPATH | &FILENAME ;
APP MAP TEMPDATA &FULLPATH
APP HOLD TEMPDATA
FILEDEF QCEXLTMP DISK &FULLFILE
....
....
ON TABLE HOLD AS QCEXLTMP FORMAT EXL2K TEMPLATE 'QCEXPHLD' SHEETNUMBER 1


I get this error:
(FOC358) ERROR ISSUING FILEDEF COMMAND FOR: filedef QCEXLTMP DISK \\Directory name\reports$

(The actual directory is MUCH longer. Could that be causing the problem?)

Any help would be appreciated.


PROD: WebFOCUS 7.1.4 on Win 2003/Microsoft-IIS 6.0/ServletExec 4.2/JAVA version 1.5.0_09
DEV: WebFOCUS 7.6.1 on Win 2003/Microsoft-IIS 6.0/ServletExec 4.2/JAVA version 1.5.0_09
LOCAL: WebFOCUS 7.6.2 on Win XP SP2/Apache Tomcat 5.5.17/JAVA version 1.5.0_09
February 02, 2006, 08:15 PM
susannah
try taking out the $
the $ is useful when mapping a drive
eg d$ will mapp to the root of the d drive
but not useful in a filedef drive reference
at least in my installation...
If blanks are giving you a prob, you could try replacing them with %20
No promises..but worth a shot till somebody smarter comes along.




In Focus since 1979///7706m/5 ;wintel 2008/64;OAM security; Oracle db, ///MRE/BID
February 03, 2006, 06:03 AM
<JG>
Mathew,

try coding it as follows

-SET &FULLPATH = '\my reports\reports$';
-SET &FILENAME = '\' || 'Filename.xls';
-SET &FULLFILE = '&FULLPATH.EVAL' || '&FILENAME.EVAL' ;

FILEDEF QCEXLTMP DISK "&FULLFILE.EVAL"
-RUN
TABLE FILE CAR
PRINT MODEL
BY CAR
ON TABLE HOLD AS QCEXLTMP FORMAT EXL2K
END
-RUN

I assume that the directory structure is on the same disk as the WebFocus server otherwise you need to give it a drive letter.

There is a bug in 7.1 (beta 3 anyway) where if the WebFocus server is started as a service then
it cannot see mapped network drives (works fine in 5.3) It cannot even do a DOS copy or move.
The problem does not occur if the WebFOcus server is started via the edastart batch file.

JG
February 03, 2006, 10:24 AM
JimRice
Try putting double quotes around the fullname variable in the filedef. Also...Do you have semi-colons after the first two -set commands?

-SET &FULLPATH = '\\Directory name\reports$';
-SET &FILENAME = '\' | 'Filename.xls';
-SET &FULLFILE = &FULLPATH | &FILENAME;
-*
-TYPE FULLPATH ---- &FULLPATH
-TYPE FILENAME ---- &FILENAME
-TYPE FULLFILE ---- &FULLFILE
-*
FILEDEF QCEXLTMP DISK "&FULLFILE"

Jim


WF DevStu 5.2.6/WF Srv 5.2.4/Win NT 5.2
February 03, 2006, 11:00 AM
Matthew
Thanks for everyone's suggstions. I did get it to work with the "$" and Spaces in the path name. I think it was the double quotes that did the trick.


PROD: WebFOCUS 7.1.4 on Win 2003/Microsoft-IIS 6.0/ServletExec 4.2/JAVA version 1.5.0_09
DEV: WebFOCUS 7.6.1 on Win 2003/Microsoft-IIS 6.0/ServletExec 4.2/JAVA version 1.5.0_09
LOCAL: WebFOCUS 7.6.2 on Win XP SP2/Apache Tomcat 5.5.17/JAVA version 1.5.0_09
February 03, 2006, 11:13 AM
JimRice
Matthew,

This also works for me if you're interested.

-SET &FULLPATH = '\\Directory name\reports$';
-SET &FILENAME = 'Filename.xls';
-*
-TYPE FULLPATH ---- &FULLPATH
-TYPE FILENAME ---- &FILENAME
-*
FILEDEF QCEXLTMP DISK "&FULLPATH|\&FILENAME"

Jim


WF DevStu 5.2.6/WF Srv 5.2.4/Win NT 5.2