0

i know this is about MySQL, but there is no 4GL forum, so i'm hoping one of you experts might know:

we have an application that uses Progress (on a unix system) that imports data from .csv files and writes the various fields to the database.

one particular type of .csv file does not have a newline (CR) at the end of its last line, and this last line is therefore being ignored by the importer application.

the consultant who programs the this application (via a script, i do not know which), has told us that every line *must* have a carriage return in order to be read, that if it doesnt have a carriage return it cant be read.

I find this hard to believe. I have fairly strong knowledge of C and variant languages, and can't imagine such a imposed restriction. the problem is that to change the application which writes the .csv file prior to database import will be painful due to manufacturing and regulatory reasons.

can you give me some insight on this?

thanks!

.

Edited by jephthah: n/a

3
Contributors
6
Replies
7
Views
7 Years
Discussion Span
Last Post by jephthah
0

i know this is about MySQL, but there is no 4GL forum, so i'm hoping one of you experts might know:

we have an application that uses Progress that imports data from .csv files and writes the various fields to the database.

one particular type of .csv file does not have a newline (CR/LF) at the end of its last line, and this last line is therefore being ignored by the importer application.

the consultant who programs the this application (via a script, i do not know which), has told us that every line *must* have a carriage return in order to be read, that if it doesnt have a carriage return it cant be read.

I find this hard to believe. I have fairly strong knowledge of C and variant languages, and can't imagine such a imposed restriction. the problem is that to change the application which writes the .csv file prior to database import will be painful due to manufacturing and regulatory reasons.

can you give me some insight on this?

thanks!

What operating system are you running the Progress application on? Is the script using Progress quoter program?

0

i had just edited to say that it's unix system. so i should say that the newline search is just looking for the CR, although the files that are being sent are created in windows systems so they have CR/LF

i do not know what script it is using. i can try to find out, they're in a completely different department.

Edited by jephthah: n/a

0

If the file is coming from WIndows, you should run a UNix utility to conver the file to Unix format. Depending on what version of Unix you are running, the utility is dos2unix, dtox, etc.

0

sorry, i should have anticipated your response.

this is *not* related to CR/CR+LF conversion problems between OSes. I know you think it looks like it is, but trust me on this.

the last line of certain CSV files truly does not have a newline. the newline was not put there because the DLL did not put it there when creating the file.

and we can not go and change the raw .CSV file after the fact, whether manipulating characters or adding newlines.... this is a strict federally-regulated environment. you don't want to go there.

My problem remains, that the progress database programmer says he cant read a line that doesnt end in a newline. i think that's not entirely accurate.

i'm wondering if anyone has any idea why he might say such a thing.

0

hi!,
Im Rizvi from Sri Lanka.
your progrmer what he told was correct. but that not solve the issue.
Solution:
before to read the .csv file, he can append a blank line to .cvs and read. so prolem will solved.

0

thanks, but that's already been dismissed as a solution. we cant go an edit DHF files in a FDA-regulated environment after the fact.

also you're about 2 months late.

thanks anyhow, tho.

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.