Remove multiple special characters from leading and trailing

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

rahuljha26
Participant
Posts: 7
Joined: Wed Sep 20, 2017 4:15 am

Post by rahuljha26 »

chulett wrote:You need to look at the description of the function again. It takes all characters in the "from" list and replaces each with the corresponding (positional) character in the "to" list. In other words, to replace them all with a "1" you would need the same number of "1"s in the second list.
Yeah Craig you are right we need to specify same number of "1"s in the second list.i tried and now it is working.
Rahul Jha
sriven786
Participant
Posts: 37
Joined: Wed Nov 08, 2017 1:36 pm

Post by sriven786 »

Yes, I tried too and could able to find the first occurrence using the INDEX Function but the issue is to find the last occurrence (May be you need to write a custom subroutine to get the last occurrence of 1 passing the string like: (!@##$$1111^&&&&&&&&&&11111*&^%$) to extract the Substring of original string (!@##$$Rami^&&&&&&&&&&&Reddy*&^%$).
Venkata Srini
Post Reply