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.

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
      *


  Dave R

  e Fax (815)4259364
  P.O. Box 17811, Irvine CA 92623-7811
  -------
  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