Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Cobol and VFP
Message
From
30/07/1998 10:38:51
 
 
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:
00122686
Views:
17
>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

Hi Anderson,

If the problem is that there are no CR/LF's at the end of each input record, you can write a little program to copy the file and put them there. Then you can do an APPEND FROM ... TYPE SDF from the file you created.

For example, if the input record is 100 bytes long, and lnInputFile and lnOutputFile are the low-level file handles for your input and output files, then the main loop would look like this:
do while not feof(lnInputFile)
   lcInputRec = fread(lnInputFile, 100)
   =fputs(lnOutputFile, lcInputRec)
enddo
The FPUTS statement puts the CR/LF at the end of each record.

HTH,
Rick

BTW, where in Brazil are you? I lived in Rio for three years...
Rick Borup, MCSD

recursion (rE-kur'-shun) n.
  see recursion.
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform