I wrote a sas macro which require two input variable. Var1
is a date variable. var2
starts with and pern in(
and ends with )
, the bracket contains a serials of numbers which are separated by commas.
%let var1 = '01DEC2011'd;
%let var2 = and pern in (10107,11308,11703,11850);
Now I first define the input variables, then define the macro and run it. It works fine
%let var1 = '01DEC2011'd;
%let var2 = and pern in (10107,11308,11703,11850);
%macro program;
...
%mend;
%program;
However, I want to change the way I assign input variables, and let my macro looks like the following:
%macro program(var1, var2);
...
%mend;
%program( '01DEC2011'd, and pern in (10107,11308,11703,11850));
Because both var1 and var2 contains special characters ' , and (), so the macro cannot be exucuted correctly. Can anyone teach me how to call my macro please.