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
;
It's finally time to hack! Remember to visit the SAS Hacker's Hub regularly for news and updates.
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.
Ready to level-up your skills? Choose your own adventure.