Importing a CSV reads first record only

Been importing this CSV file to TPS for years. Last couple of years my app reads the first record only and closes.
If I edit the CSV and move the first record to the bottom or move the last record to the top running the import routine again imports the CSV with no problem.
Clarion 9.1 - Just curious what could cause this.

I suspect you’ve got something in the first record that’s screwing things up.
Use an editor with HEX edit mode like PsPad
and open the .CSV then select ‘View’ - ‘HEX edit mode’ and look at the start of the first record and the end of the first record.
Check the record ending is what you’ve programmed for and that it doesn’t end with an end of file marker (decimal 26, HEX 1A)

Check the record beginning to see if there’s a B(yte)O(rder)M(arker) ie EF BB BF HEX that will indicate the file is being sent in UTF-8 format instead of the expected ANSI/ASII

1 Like

It could be your file changed from 13,10 line ending to just 13 or just 10. Maybe the Editor is fixing it back to 13,10

You could try viewing it using the DCT Browse Table. Change the End of Record and try 1,10 or 1,13 then View.

Many thanks Carl. It looks like that solved it. Added 1,10 to End of Record Marker. Recompiled, ran again with the original csv and all records processed. Will be interesting to see how it goes next month.

Thanks Graham,

It looks like adding 1,10 to End of Record solved it. Same file received monthly so it will be interesting to see. Hopefully, it’s a pain when this happens.