Remove Whitespace

Post questions here relative to DataStage Server Edition for such areas as Server job design, DS Basic, Routines, Job Sequences, etc.

Moderators: chulett, rschirm, roy

Post Reply
Anthony1200
Premium Member
Premium Member
Posts: 28
Joined: Wed Mar 28, 2007 6:57 am
Location: Amsterdam

Remove Whitespace

Post by Anthony1200 »

Hi,

I just want to remove white space from a string but the StripWhiteSpace function seems to be missing? So can I use Trim?

Regards,
A
Anthony1200
Premium Member
Premium Member
Posts: 28
Joined: Wed Mar 28, 2007 6:57 am
Location: Amsterdam

Post by Anthony1200 »

Whoops stupid of me..

Trim(String,' ', "A")

Thanks :)
v2kmadhav
Premium Member
Premium Member
Posts: 78
Joined: Fri May 26, 2006 7:31 am
Location: London

Post by v2kmadhav »

Anthony

Note that this would even strip off the potential white spaces between two words eg: address fields, if you have any.

Using a trim(string) or trim(string, ' ', T) should strip any trailing white spaces...

However can u see the output or the input on a database ?
try to see the dump of that field if the trailing white spaces are 32's.

if they are not 32s then trim might not work.

cheers
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Post by ray.wurlod »

StripWhiteSpace() is for parallel jobs - it's not missing, it's just that you're not in a parallel job.

Trim() has arguments that strip "white space", which includes space characters and tabs, from various parts of the string. If NLS is enabled, then trimmable characters are set in the CHARACTER category of your currently selected locale.
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