variables for import fiellds

Ryan Powers ryanx at indy.rr.com
Wed Sep 19 22:51:58 PDT 2012


I'm trying to do an import of a csv file which may vary in the number of
fields it contains and their order. 

My approach is to use a metadata file which can also be imported. In this
file, each line contains a field number that corresponds to the fields in
the csv. Here is what I am doing:

1. open the csv
2. grab a free record
3. open the metadata file
4a. loop on the metadata import, and keep a count of the number of loops
4b. read a metadata "record" which is a field number
4c. put the value from csv field n into lookup ct.
Something like this:

ct(4,.0)="1"
fd = metadata(1)
lkup(fd) = myimport(ct); ct=ct+"1";

The problem is that myimport(ct) fails the syntax check. Is there a function
that I could use? 

Thanks.



---
Ryan Powers
Bulldog Software, Inc.
http://www.bulldogsoftware.com






More information about the Filepro-list mailing list