how to convert & into AND

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
pavankatra
Participant
Posts: 86
Joined: Wed Mar 03, 2010 3:09 am

how to convert & into AND

Post by pavankatra »

Hi,
how to convert & into AND.

Can anyone please suggest me how to achieve this.

Thanks iun advance
Sainath.Srinivasan
Participant
Posts: 3337
Joined: Mon Jan 17, 2005 4:49 am
Location: United Kingdom

Post by Sainath.Srinivasan »

Code: Select all

sed -e 's/\&/AND/g' yourFileName
pavankatra
Participant
Posts: 86
Joined: Wed Mar 03, 2010 3:09 am

Post by pavankatra »

Sainath.Srinivasan wrote:

Code: Select all

sed -e 's/\&/AND/g' yourFileName
...
THanks for your reply.

but here i am working on windows.So please suggest me.
priyadarshikunal
Premium Member
Premium Member
Posts: 1735
Joined: Thu Mar 01, 2007 5:44 am
Location: Troy, MI

Post by priyadarshikunal »

It should work on windows as well because of MKS Toolkit installed with Datastage.
Priyadarshi Kunal

Genius may have its limitations, but stupidity is not thus handicapped. :wink:
pavankatra
Participant
Posts: 86
Joined: Wed Mar 03, 2010 3:09 am

Post by pavankatra »

priyadarshikunal wrote:It should work on windows as well because of MKS Toolkit installed with Datastage.
Thanks for your reply

where can i use that suugest me please.

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

Post by ray.wurlod »

Presumably this is an isolated ampersand, one with space either side of it. Or will you have strings like Abbott&Costello - and, in that case, what is your rule for dealing with it?

Check out the parallel version of Ereplace() (search DSXchange for it). It does exactly what you require. But note that you may need to replace " & " with " AND ".
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