kdhagemann
24th September 2013, 13:13
Hi there!

We have to export various tables to CSV in order to transfer to 3rd party systems. I decided for XCH, as this is a very convenient way of extracting data from Baan.

Now found a strange error and need to get urgently around it (am under time pressure). Therefore any help/advice would be greatly appreciated.

Problem: When exporting (non-regular) the customer table (tccom010 plus some extra generated fields), the export run stops before writing the first line. I debugged the export script and found that it runs well through all the values and conditions in the main selectdo loop and then stops (BW Message "Connection with server lost") in function
function extern write.fld.vars.to.line.[batchline].[ASCIIFile](...)
The line producing the error is
line(lpos) = sprintf$(....)

My Question: Is there any known limit for the line length to be written to an CSV file??

Any ideas are very welcome, thanks in advance.
Klaus

kdhagemann
24th September 2013, 13:52
Just found the following:
I have 239 fields to export.
Splitting the export to 5 batchlines (=> 5 separate CSV output files) solves the issue.
Leads to the assumption that there IS a limit for output line length!

It is now a stupid piece of work to export 5 files and concatenate them back together after exporting...

Any known ways to get around this...?