You really need to learn how to use the SAS documentation!
https://documentation.sas.com/doc/en/pgmsascdc/9.4_3.5/mcrolref/p1nypovnwon4uyn159rst8pgzqrl.htm
If you DEFINE a macro name MYMACRO with a statement like:
%macro mymacro(source, file,ID);
Then the macro's parameters ( SOURCE, FILE and ID) will all be LOCAL macro variables.
Try it:
943 %macro mymacro(source, file,ID); 944 %put _local_; 945 %mend mymacro; 946 %mymacro; MYMACRO FILE MYMACRO ID MYMACRO SOURCE
@HeatherNewton wrote:
dont see a statement declarinf source as macro variable..
Variables and macro variables do not have to be declared in SAS.
Are you ready for the spotlight? We're accepting content ideas for SAS Innovate 2025 to be held May 6-9 in Orlando, FL. The call is open until September 25. Read more here about why you should contribute and what is in it for you!
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.