replace | with |"

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
kiran0435
Participant
Posts: 39
Joined: Sun Sep 26, 2010 10:28 pm

replace | with |"

Post by kiran0435 »

Hi,

My requirement is to replace | with |"

i tried with convert('|','|"', inputcolumn). But this doesn't solve the requirement.

Please suggest me how to solve this. My output is one shared container for which i have to send the data in this format.
SURA
Premium Member
Premium Member
Posts: 1229
Joined: Sat Jul 14, 2007 5:16 am
Location: Sydney

Re: replace | with |"

Post by SURA »

Create a stage variable and give |" as a value for that. Then use that in the function


DS User
kiran0435
Participant
Posts: 39
Joined: Sun Sep 26, 2010 10:28 pm

Post by kiran0435 »

No Sura... this is not working...
BI-RMA
Premium Member
Premium Member
Posts: 463
Joined: Sun Nov 01, 2009 3:55 pm
Location: Hamburg

Post by BI-RMA »

This is a job for PXEReplace().

Take a look at this post:

viewtopic.php?t=106358&highlight=PXEReplace
"It is not the lucky ones are grateful.
There are the grateful those are happy." Francis Bacon
chulett
Charter Member
Charter Member
Posts: 43085
Joined: Tue Nov 12, 2002 4:34 pm
Location: Denver, CO

Post by chulett »

Convert replaces a single character with another single charater. As noted, you need the parallel version of the Server EReplace function.
-craig

"You can never have too many knives" -- Logan Nine Fingers
mobashshar
Participant
Posts: 91
Joined: Wed Apr 20, 2005 7:59 pm
Location: U.S.

Post by mobashshar »

Or..
You can use Before Job Subroutine and use SED or AWK to replace the | with |"
SURA
Premium Member
Premium Member
Posts: 1229
Joined: Sat Jul 14, 2007 5:16 am
Location: Sydney

Post by SURA »

In the stage variable copy and paste this "|'''" and use that SV, you will get that result.

DS User
Post Reply