I do a lot of importing of text files, typically tab delimited. My problem is, sometimes one of the columns is a notes column and contains 'carriage return' characters (chr(13) characters). Progress interprets these as the end of the line. I am wondering if there is a way to get around this and only have progress interpret line feeds (chr(10) characters) as the end of a line, leaving the carriage return characters in the variable the line is being read into. I could then replace these characters with something else if needed.
This is the typical code I use to import a file:
DEFINE STREAM IMPORT-STR.
DEF VAR V-FILE-TEXT AS CHAR NO-UNDO.
INPUT STREAM IMPORT-STR FROM VALUE("").
REPEAT ON ENDKEY UNDO, LEAVE:
IMPORT STREAM IMPORT-STR UNFORMATTED V-FILE-TEXT.
/*process V-FILE-TEXT here */
END.
Perhaps the Quoter utility might be of use - particularly with the -d or -c options. You'll find more information in the documentation (OpenEdge Development: Programming Interfaces - http://documentation.progress.com/output/OpenEdge101a/wwhelp/wwhimpl/java/html/wwhelp.htm?href=dvpin/dvpin-33-2.html).
Let us know if that doesn't work for you.