Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Cobol and VFP
Message
De
30/07/1998 02:31:07
 
 
À
29/07/1998 21:48:25
Anderson Girardi
Athenas Automação de Escritório
Porto Alegre, Brésil
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Titre:
Divers
Thread ID:
00122575
Message ID:
00122613
Vues:
12
>Hello All
>
>I'm impoting data from Cobol to VFP using
>append from type sdf
>append from alunos type sdf, and the vfp shows me the follow error message: Line too long
>
>Anyone can help me?
>
>Thanks

Where is this data coming from? A mainframe of some type? A Unix Box?
Basically, what's happening is the sdf file doesn't have a CR/LF at the end fo the line, so Fox doesn't know where the line ends.

If you can't get the file down with a CR/LF, you'll have to open it with the low level functions and read it one line and a time and parse the incoming line for the individual fields. The most basic way would be:

fhandle = fopen('alunos') && opens the incoming data file
if fhandle < 0
wait window "Can't open file"
return
endif
do while !feof(fhandle)
mline = fget(fhandle,recordlength) && where recordlength is the length of 1 record
**parse out individual fields
enddo
"You don't manage people. You manage things - people you lead" Adm. Grace Hopper
Pflugerville, between a Rock and a Weird Place
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform