Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
ONE FOR THE EXPERTS - Appending lines with different for
Message
De
10/05/1998 19:00:45
 
 
À
10/05/1998 17:45:38
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Divers
Thread ID:
00098397
Message ID:
00098402
Vues:
64
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
>
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform