Page 1 of 1

Removing Tabs and Carriage Returns

Posted: Thu Apr 14, 2011 5:10 am
by bhargav_dd
I am using DS 8.5 Parallel jobs on Windows and I have a incoming data with Line feeds and carriage returns and lots of extra spaces. I need to get rid of the Tabs, Line Feeds, Carriage returns and extra spaces so I can get as much as possible from the input into a 255 space. I tried using some Trim functions but it does not seem to work. I tried Trim(Trim(InFile.Comments,Char(012),"A") ,Char(015),"A") to remove line feeds and carriage returns but it does not seem to be working.
I found the Char(012) used in an answer here about the same issue but the were on Unix. Does anyone know if these Char(nnn) ascii values should work in Windows? Or does anyone know how to remove Carriage Returns and line feeds some other way

Thanks

Re: Removing Tabs and Carriage Returns

Posted: Thu Apr 14, 2011 5:53 am
by MarkB
Those are not CRLF ... try char(13) and char(10), not 12 and 15.

Posted: Thu Apr 14, 2011 4:26 pm
by ray.wurlod
12 and 15 are octal values. The Char() function requires decimal arguments.