Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Reading in an ascii file with FOPEN()
Message
 
 
To
04/03/1999 23:08:28
General information
Forum:
Visual FoxPro
Category:
Other
Miscellaneous
Thread ID:
00194312
Message ID:
00194329
Views:
22
Robert,

I'd just use tables
create cursor SecondAscii ( cText c(250) )
create cursor FirstAscii ( cText c(250) )
append from FirstAscii.txt type sdf
scan
   if ( "search text" $ cText )
      insert into SecondAscii values ( "what to put there" )
   endif
endscan
You could speed the process up if the insert just went ahead and put field values into the table.

>I need to read in a ascii file and do a string search on each line and
>denpending on what is found with the string search, I will write out to another ascii file. The form will be:
>open first ascii file
>open second ascii file
>do while .t.
> read in a line of the first ascii
> if search criteria is met
> write out a line to the second ascii file
> else
> loop
>endif
>endo
>
>I will then do a APPEND FROM to bring the second ascii file into a vfp dbf. Any ideas?
df (was a 10 time MVP)

df FoxPro website
FoxPro Wiki site online, editable knowledgebase
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform