Information générale
Catégorie:
Codage, syntaxe et commandes
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
Voir le fil de ce thread
Voir le fil de ce thread à partir de ce message seulement
Voir tous les messages de ce thread
Voir tous les messages de ce thread à partir de ce message seulement