Hi,
I have a peculiar situation.
I have a column in a dataset that can have values as below
002-0002==NON-FINAL/INTERNAL TEST|009-0004==CUSTOM/RELATIONSHIP
002-0002==NON-FINAL/INTERNAL TEST
What I want as output is to replace '==' with just one '='
so desired output
002-0002=NON-FINAL/INTERNAL TEST|009-0004=CUSTOMER/RELATIONSHIP
002-0002=NON-FINAL/INTERNAL TEST
What function can I use for the same ?
Thank you.
How about the TRANWRD function? Example:
newstring=tranwrd(oldstring,'==','=');
How about the TRANWRD function? Example:
newstring=tranwrd(oldstring,'==','=');
@PaigeMiller - thank you . that worked. I had tried translate but that did not treat the two == as one occurence ..
It's finally time to hack! Remember to visit the SAS Hacker's Hub regularly for news and updates.
Learn how use the CAT functions in SAS to join values from multiple variables into a single value.
Find more tutorials on the SAS Users YouTube channel.
Ready to level-up your skills? Choose your own adventure.