Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
FGETS() vs. IMPORT/APPEND FROM
Message
From
18/11/1998 11:45:32
 
 
To
18/11/1998 09:52:23
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
00158744
Message ID:
00158839
Views:
13
>So, most of what we use FPW2.x for round here is data conversion. We get .SDF, .XLS and .TXT files from various places, convert the data and send it on. Some of it is coming from our mainframe & going to customers, some is coming from customers heading for our mainframe.
>
>In these circumstances my preference is to use the low level file functions to read each record (fixed length records) then validate, break it up and convert it and write it out in its final form (either .DBF, .TXT, or .XLS)
>
>My predecessor has been importing to a temporary .DBF, then reading this back, doing the data conversion and writing out the final file.
>
>Does anyone have any clue as to which is more efficient? No reason other than curiousity. I've done scads of data conversion in my career and almost always done it this way --even in dBASE, though at times I did have to resort to useing BASIC...
>

If the file is really flat, fixed length records with ASCII in them, APPEND FROM...SDF does a great job - create a cursor in the right format, do your APPEND FROM, and go from there. Unfortunately for me, a great deal of what I see isn't so well-behaved; embedded binary data, EBCDIC, stuff from Unix/Mac environments which weren't exported with a clean CR/LF delimiter and the like make this an impractical solution in many cases, and i fall back to low-level file I/O there.
EMail: EdR@edrauh.com
"See, the sun is going down..."
"No, the horizon is moving up!"
- Firesign Theater


NT and Win2K FAQ .. cWashington WSH/ADSI/WMI site
MS WSH site ........... WSH FAQ Site
Wrox Press .............. Win32 Scripting Journal
eSolutions Services, LLC

The Surgeon General has determined that prolonged exposure to the Windows Script Host may be addictive to laboratory mice and codemonkeys
Previous
Reply
Map
View

Click here to load this message in the networking platform