Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Read 475 character wide text file
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Autre
Versions des environnements
Visual FoxPro:
VFP 9 SP2
OS:
Windows Server 2012
Network:
Windows 2008 Server
Database:
MS SQL Server
Application:
Web
Divers
Thread ID:
01577859
Message ID:
01577860
Vues:
63
>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
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform