To convert Semicolon to '**' within braces

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
balu536
Premium Member
Premium Member
Posts: 103
Joined: Tue Dec 02, 2008 5:01 am

To convert Semicolon to '**' within braces

Post by balu536 »

Hi,
I've a requirement where i need to convert Semicolon to '**' value within braces present in a column. I might also have Semicolon which is not included within braces and it should be retained the same. The number of Semicolons within braces are dynamic.

For Ex:

London University; Harvard University(1947; Masters; Distinction); Stanford University(1948, Masters; Distinction); Cambridge University(1949; Graduation, First class)

Which needs to be transformed as

London University; Harvard University(1947** Masters** Distinction); Stanford University(1948, Masters** Distinction); Cambridge University(1949** Graduation, First class)


Thanks in Advance.
BI-RMA
Premium Member
Premium Member
Posts: 463
Joined: Sun Nov 01, 2009 3:55 pm
Location: Hamburg

Post by BI-RMA »

Hi balu536,

have a look at this post:
viewtopic.php?t=106358&postdays=0&posto ... e&start=30

pxEreplace is what You are looking for.

You may have to refine it to replace only occurences of substr within brackets.
"It is not the lucky ones are grateful.
There are the grateful those are happy." Francis Bacon
Post Reply