Focal Point
FILEDEF problem

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

August 25, 2005, 02:36 PM
k.lane
FILEDEF problem
Could someone help me out. I am issuing a FILEDEF through the normal means and then doing a read from the file. However, I'm not seeing any data being returned.

-DEFAULT &INFO = ' ' ;
FILEDEF FILE1 CLEAR
FILEDEF FILE1 DISK C:\DATA\FILE1.TXT
-RUN
-READ FILE1 &INFO.A13.
-TYPE FILE1 DATA IS &INFO

...and yes, there is data in FILE1.TXT.

WF 533
Windows XP
Unix environment

Ken
August 25, 2005, 02:44 PM
Francis Mariani
Ken, add the

? FILEDEF

command to see if your FILEDEF worked.

As well, what do you mean by "Windows XP" AND "Unix environment"?

Is the file on the Unix server?
August 25, 2005, 03:05 PM
k.lane
Francis,

Some of this is probably fogginess due to my returning from vacation.

My version of WebFOCUS is installed on a unix box. I'm just running Windows XP on my desktop. One of the problems I'm running into could be that there is no local development through the install of WF. Hence, I don't have any apps to work with on my C drive.

I just did the ? FILEDEF and received the following:

Lname Device Lrecl Recfm Append Filename
============================================================
SCMDATA DISK 0 V /ibitemp/srv53/devl/webfocus/e
datemp/ts005268/C:\test.txt

I'm thinking I might have to change the location of my file.

Ken
August 25, 2005, 03:12 PM
k.lane
Francis,

I also just found out that there is a shared drive between unix and Windows that I can use which will likely solve my problem.

Ken
August 25, 2005, 03:12 PM
Francis Mariani
The filedef should point to a location on the UNIX server.

Cheers.
August 27, 2005, 02:10 PM
<toby mills>
Hey Ken

I thought I'd throw in my 2 cents here. You should be fine letting focus write to the edatemp area, but you might want a more simple name instead of that DOS looking name.

So, try

DEFAULT &INFO = ' ' ;
FILEDEF FILE1 CLEAR
FILEDEF FILE1 DISK FILE1.TXT
-RUN
-READ FILE1 &INFO.A13.
-TYPE FILE1 DATA IS &INFO

Looks to me like that should work fine.

Or do an

APP FI FILE1 DISK FILE1.TXT

Using the APP command, maybe you could direct it to a real location easily enough by doing

APP FI FILE1 DISK myapp/FILE1.TXT

and from there, you can actually go do an LS on the file to see if it's there and take a look at what's being written in it.

-Toby
August 29, 2005, 12:29 AM
susannah
k. where's your master? is it on your path?
if it isn't, you'll get exactly the 0 lines you experienced.
August 29, 2005, 03:17 AM
TexasStingray
k.lane

you said that WebFOCUS is running on UNIX. So that means that when a filedef is issued, it is the WebFOCUS Reporting Server (WFRS) that is going to issues it. So the WFRS is looking at the UNIX file system. Yes, there can be shared drives between UNIX and Windows. However, the programs that access it share will us the Operating Systems file structure to access it. Unix File System Structure on UNIX (WFRS, etc...) and Windows File Systems on Microsoft Windows (Windows Explorer, etc...). With all that said the unix filedef would look something like this.

FILEDEF MYFILE DISK /opt/ibi/apps/myfile.txt
keep in mind that the UNIX file system is case sentative.

Hope this helps.