Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Appending .txt files without spaces.
Message
 
To
08/05/2001 11:04:23
Jorge Villasenor
Luz y Fuerza Del Centro
Mexico City, Mexico
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
00504731
Message ID:
00504734
Views:
18
>I have this .txt file with 5 columns of info, it is delimited with blanks, each record is something like this:
>
>"NA048032 <20 spaces> 040502010100 <15 spaces> 000800 <20 Spaces> A05075300 <5 spaces> 00DIN"
>
>when using:
>
>APPEND FROM file.txt DELIMITED WITH BLANK
>
>I need to have a table with enough columns for every space in the record!!!
>
>Question: How can i ignore those nasty spaces?

If the fields do not contain any spaces then using CHRTRAN() to eliminate them and then a straight append TYPE SDF will work.
lcoldtext = FILETOSTR("oldtext.txt")
= STRTOFILE(CHRTRAN(lcoldtext, SPACE(1), ""), "newtext.txt")
APPEND FROM newtext.txt TYPE SDF
George

Ubi caritas et amor, deus ibi est
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform