in work library i assigned below macro variables i want assigned macro variables count in session
%let a=Alfred;
%let b=William;
%let c=Philp;
how to get macro variables count in a library
I don't understand what the question is.
how can we get macro variables count in a library
for example i assigned three macro variables in a work library
@BrahmanandaRao wrote:
how can we get macro variables count in a library
for example i assigned three macro variables in a work library
Please explain further. Macro variables are not associated with a library.
Macro variables are not related to librefs or datasets.
You an query the DICTIONARY.MACROS metadata.
For example to find the number of GLOBAL macro variables you could use this query.
proc sql ;
select count(*) as n_macros
from dictionary.macros where scope='GLOBAL' and offset=0
;
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.