Try Convert('%3D',':',Input.String). that should work to replace your first string. Use stage variables and convert once for the %3D value and again for the next value. You might try nesting the function, but I like using stage variables instead makes it easier to read later. Let me know if this works for you,
kwwilliams wrote:Try Convert('%3D',':',Input.String). that should work to replace your first string. Use stage variables and convert once for the %3D value and again for the next value. You might try nesting the function, but I like using stage variables instead makes it easier to read later. Let me know if this works for you,
The problem is the Convert function is replacing even %2D along with the %3D, as it encounters % and is replacing it with :
Is this a literal string "%3D" or are you referring to a single character 0x3d ?
Convert() is a character-by-character conversion; Convert('%3D',':',Arg) is the same as Convert('%',':',Arg) then Convert('3','',Arg) then Convert('D','',Arg) - which is not the effect you intended.
In server jobs and BASIC Transformer stages you could use the Ereplace function, which does perform substring replacement. However I don't believe there's an equivalent in parallel jobs unless you create your own (for example as a buildop or as a parallel routine).
If the substring only occurs once, you could wrap the Convert() function in an If..Then..Else construct. Test for the existence of '%3D' and only apply the Convert() if it's found.
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.