Stripping ^M character

amazing66

New Member
From what I can gather from other related threads, the stripping of the ^M character is usually done on the UNIX side. At the moment I am dumping some data on a Windows box that is subsequently read by a UNIX application. Unfortunatley the ^M character contained in the dump file causes a Unix error (unrecognised character) when an attempt is made to import this data. Is there any way I can prevent the ^M character from appearing using Progress code? Any information would be greatly appreciated.

John
 

vinod_home

Member
It is because its being created in binary mode and read in ascii mode or vice-versa. Who creates the file, program run on windows or program run on unix. When do you get the error during parsing or during reading the line. You can use a replace command to replace the ^M with blank.

HTH
Originally posted by amazing66
From what I can gather from other related threads, the stripping of the ^M character is usually done on the UNIX side. At the moment I am dumping some data on a Windows box that is subsequently read by a UNIX application. Unfortunatley the ^M character contained in the dump file causes a Unix error (unrecognised character) when an attempt is made to import this data. Is there any way I can prevent the ^M character from appearing using Progress code? Any information would be greatly appreciated.

John
 
Unix has a couple of useful commands
sed and tr

Sed is a LOT more grown up and will do much more than just this.

tr will do a replace of one character for another.

How are the files being transfered to the Unix box? If using FTP then ensure the file type is ASCII by typing ASC at the FTP prompt. This will also deal with this.

I am surprised that Progress is having problems with CR/LF. I've always found it to be good at dealing with this.....
 
Top