Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
ONE FOR THE EXPERTS - Appending lines with different for
Message
From
10/05/1998 19:00:45
 
 
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
00098397
Message ID:
00098402
Views:
63
Hi John, from Australia.
I've done a bit of this sort of work.
I'd approach the problem using
FOPEN() and FGETS()

Roughly ....
fp= FOPEN("sdffile_name")
DO WHILE ! FEOF(m.fp)
cS= FGETS(m.fp)
DO CASE
CASE m.cS = "A" && or whatever first character you like
* parse cS into table1, or to another low level file!
CASE m.cS = "B"
* etc
ENDCASE
ENDDO
FCLOSE(m.fp)

I haven't debugged this of course, but you get the idea

Dave


>INCOMING.SDF can have different layouts on a line by line basis, so I need to be able to look at the first character of an entire line, then append the entire line into a set of tables, like so:
>
>Line Layout 1 --> Table1.dbf (which just holds Layout 1 records)
>Line Layout 2 --> Table2.dbf (etc.)
>Line Layout 3 --> Table3.dbf
>Line Layout 4 --> Table4.dbf
>Line Layout 5 --> Table5.dbf
>Line Layout 6 --> Table6.dbf
>
Previous
Reply
Map
View

Click here to load this message in the networking platform