Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Cobol and VFP
Message
From
30/07/1998 02:31:07
 
 
To
29/07/1998 21:48:25
Anderson Girardi
Athenas Automação de Escritório
Porto Alegre, Brazil
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Title:
Miscellaneous
Thread ID:
00122575
Message ID:
00122613
Views:
13
>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
Previous
Reply
Map
View

Click here to load this message in the networking platform