Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Read 475 character wide text file
Message
General information
Forum:
Visual FoxPro
Category:
Other
Environment versions
Visual FoxPro:
VFP 9 SP2
OS:
Windows Server 2012
Network:
Windows 2008 Server
Database:
MS SQL Server
Application:
Web
Miscellaneous
Thread ID:
01577859
Message ID:
01577860
Views:
64
>I have to open a read the USPS ACS files to update our database.
>The files from the USPS have a total record length of 427 Characters.
>What would be the best way to open, read, and parse this data out with VFP?
>
>Thanks,
>Larry

You could use low level functions but I find it easier to create a table on the fly so the fields can easily be adjusted and IMPORT filename SDF. That's assuming each record is terminated with a carriage return.
 CREATE CURSOR C_ACS (ADDR1 C(20), ADDR2 C(20)...)
 IMPORT  FROM ACS.TXT SDF
BROW
Browsing should show you where you need to adjust the field sizes. If there are numeric fields always start with chr fields then change to numeric once you have the field sizes right.
Beer is proof that God loves man, and wants him to be happy. - Benjamin Franklin
John J. Henn
Previous
Reply
Map
View

Click here to load this message in the networking platform