Removing Tabs and Carriage Returns

Post questions here relative to DataStage Enterprise/PX Edition for such areas as Parallel job design, Parallel datasets, BuildOps, Wrappers, etc.

Moderators: chulett, rschirm, roy

Post Reply
bhargav_dd
Premium Member
Premium Member
Posts: 57
Joined: Tue Jun 30, 2009 9:38 am

Removing Tabs and Carriage Returns

Post 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
MarkB
Premium Member
Premium Member
Posts: 95
Joined: Fri Oct 27, 2006 9:13 am

Re: Removing Tabs and Carriage Returns

Post by MarkB »

Those are not CRLF ... try char(13) and char(10), not 12 and 15.
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Post by ray.wurlod »

12 and 15 are octal values. The Char() function requires decimal arguments.
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
Post Reply