Focal Point
Problem writing to directory with long full path and filename

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

August 30, 2007, 04:16 PM
Got2Focus
Problem writing to directory with long full path and filename
Hello,

I am having a problem writing a file to a particular directory. The full path is very long. When I shorten the filename, the program executes successfully. When I run it as shown below, it executes with no errors but does not write the file to the specified directory.

Question: Is there a limit on the number of characters for the full path + filename? Is there a limit on the numbers of characters that can be passed to a variable using the -SET command?

Thanks in advance,


-SET &STATEL = '\\serverl7\MwProd\WebReports\Group\26+Reports\Central\StateLaw\STATELAW_CENTRAL_ANNV10_GRP123456_08302007.PDF';

FILEDEF &STATEL DISK &STATEL

-********************

SET HOLDLIST = ALL
TABLE FILE MED2
SUM
MD_CON
MD_MBR
CL_RXMED
PR_RXMED
DEN_CON
DEN_MBR
DEN_PAID
DEN_INC
BY FIN_CYCLE_DT
HEADING
"PAID CLAIMS BY MONTH"
FOOTING
"Report statelaw"
"Produced on <+0>&DATEtrMDYY <+0> "
ON TABLE SET PAGE-NUM OFF
ON TABLE NOTOTAL
ON TABLE SAVE FILENAME
&STATEL
FORMAT PDF

----------------------------------
WF 7.1.3 ; Windows XP; DB2


WF 7.1.3 - Win 2003 - DB2
August 31, 2007, 04:20 AM
hammo1j
Use double quotes round the filename.

SET &STATEL = '"\\serverl7\MwProd\WebReports\Group\26+Reports\Central\StateLaw\STATELAW_CENTRAL_ANNV10_GRP123456_08302007.PDF"';

FILEDEF &STATEL DISK &STATEL



Server: WF 7.6.2 ( BID/Rcaster) Platform: W2003Server/IIS6/Tomcat/SQL Server repository Adapters: SQL Server 2000/Oracle 9.2
Desktop: Dev Studio 765/XP/Office 2003 Applications: IFS/Jobscope/Maximo
August 31, 2007, 09:29 AM
cburtt
The normal use of FILEDEF is "FILEDEF DISK ". The command makes a relationship between the full path to a file, the 'external name' by which it is known to the OS, and a short nickname for the file, the 'internal name' by which it can be referenced by the executing FOCUS application. You don't need the 1st "&STATEL". It can be replaced with a 'hard coded' short name.

This would work as well:
FILEDEF DOG DISK &STATEL
which would be combined with:
ON TABLE SAVE SAVE AS DOG


WIN/2K running WF 7.6.4
Development via DevStudio 7.6.4, MRE, TextEditor.
Data is Oracle, MS-SQL.
August 31, 2007, 09:33 AM
cburtt
Sorry about the content of my previous post. I used angular brakets (gt,lt characters) in my representation of the syntax, and it got "gobbled up" by html as tags. Here it is again with different brackets: "FILEDEF [internalname] DISK [externalname]".


WIN/2K running WF 7.6.4
Development via DevStudio 7.6.4, MRE, TextEditor.
Data is Oracle, MS-SQL.
August 31, 2007, 10:34 AM
EricH
I'm on 7.62, and this worked for me:

-SET &FILENAME = 'C:\ibi\apps\MwProd\WebReports\Group\26+Reports\Central\StateLaw\a-very-very-very-very-very-very-very-long-folder-name\STATELAW_CENTRAL_ANNV10_GRP123456_08302007.PDF';

FILEDEF MYHOLD DISK &FILENAME
-RUN

TABLE FILE CAR
   PRINT CAR BY COUNTRY
ON TABLE HOLD AS MYHOLD FORMAT PDF
END
-RUN 

August 31, 2007, 11:07 AM
Got2Focus
ERICH, YOUR METHOD WORKED PERFECTLY FOR ME!

BIG THANKS TO HAMMO1J AND CBURTT FOR YOUR RESPONSES.

THANKS AGAIN!!!


WF 7.1.3 - Win 2003 - DB2