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 ..
Available on demand!
Missed SAS Innovate Las Vegas? Watch all the action for free! View the keynotes, general sessions and 22 breakouts on demand.
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.
Select SAS Training centers are offering in-person courses. View upcoming courses for: