08-24-2011 10:53 AM
please I need assistance to resolve an issue. The issue is on how to use macro to remove parenthesis () from variable string. For example given the following variables:
(cup table plates iron street home) but I need the remove the () in order to work with the variables.
08-24-2011 11:00 AM
You can get rid of them by using the compress function. e.g.:
informat stuff $80.;
input stuff &;
(cup table plates iron street home)
08-24-2011 01:49 PM
To clarify are you looking to USE a macro function or to create a macro to do this.
If you want to create a macro what do you envision as the input and what as the output?
Some of the macro functions you'll can look into are:
%if %then %do
Or you could just wap the compress function in a macro .
You could always use a find or index function in a data _null_ step.
Basically there's many ways to do this and it sounds a lot like a home work question to me.
You should also move this thread to the macro language forum.