No, it looks like he is trying to assign a name to a variable and then
using that variable to hold the opened file which is illegal in the
language. It may be possible with literal equates but I doubt it. The
reason for the data type error is because the variable F.NAME was
already defined as the variable "F.":INV.FILES<1,F> and then he tries
opening a file using that variable to hold the file variable:

OPEN FILENAME TO F.NAME ELSE STOP 201, FILENAME

-----Original Message-----
From: Anthony W. Youngman [mailto:[EMAIL PROTECTED] 
Sent: Friday, July 06, 2007 1:14 PM
To: [email protected]
Subject: Re: [U2] OPEN FILENAME TO F.FILENAME ELSE STOP problem in a
loop.

In message <[EMAIL PROTECTED]>, Cliff Bennett 
<[EMAIL PROTECTED]> writes
>Hi Dave,
>
>I'm not sure what is the purpose of lines 9 and 10 (assigning values to
>FILE.NAME and F.NAME).  F.NAME can be undefined until the OPEN
statement
>places the file descriptor into it.
>
>I know you cannot have a MV list of file descriptors.  Each must be a
full
>variable.  If you really want a list, you can use a subscripted array
instead
>of a dynamic array.  You could then use MATREAD to load the INV.FILES()
array,
>place the "-INV" suffix on each element and then open the files to a
>subscripted F.NAME() array.

This looks to me like it's just a test that the files can be opened ...

The OPEN statement is reusing the same variable every time, so in order 
to open file 2 it's closing file 1, etc etc etc.

Cheers,
Wol
>
>Regards, Cliff
>
>  ----- Original Message -----
>  From: Dave R
>  To: [email protected]
>  Sent: Thursday, July 05, 2007 1:47 PM
>  Subject: [U2] OPEN FILENAME TO F.FILENAME ELSE STOP problem in a
loop.
>
>
>  I am trying to open a group of files from a list of files in the
table
>file.
>  Does anyone know how to make the constant in the open file statement
work.
>I
>  get the good old IMPROPER DATA TYPE error message when I try to read
the
>file
>  I opened with the code. In the mean time I will open each file
separately .
>  Thanks Dave.
>
>      OPEN 'TABLE'TO F.TABLE ELSE STOP 201,'TABLE'
>      READV INV.FILES FROM F.TABLE ,"INVENTORY-FILES",1 ELSE
>         CRT; CRT "CANT FIND TABLE 'INVENTORY-FILES'"; RETURN
>      END
>      CONVERT ',' TO @VM IN INV.FILES
>      FDC = DCOUNT(INV.FILES,@VM)
>      FOR F = 1 TO FDC
>         FILENAME = INV.FILES<1,F>:"-INV"
>         FILE.NAME = INV.FILES<1,F>
>         F.NAME = 'F.':FILE.NAME
>         OPEN FILENAME TO F.NAME ELSE STOP 201, FILENAME
>      NEXT F
>      *
>

-- 
Anthony W. Youngman <[EMAIL PROTECTED]>
'Yings, yow graley yin! Suz ae rikt dheu,' said the blue man, taking the
thimble. 'What *is* he?' said Magrat. 'They're gnomes,' said Nanny. The
man
lowered the thimble. 'Pictsies!' Carpe Jugulum, Terry Pratchett 1998
Visit the MaVerick web-site - <http://www.maverick-dbms.org> Open Source
Pick
-------
u2-users mailing list
[email protected]
To unsubscribe please visit http://listserver.u2ug.org/
-------
u2-users mailing list
[email protected]
To unsubscribe please visit http://listserver.u2ug.org/

Reply via email to