sas - what the last "." after the macro variable mean -


below code create dataset exisitng datasets, end , end8, end7 macro variables, wondering why add . @ end of macro variables?

data tab4a_&end.; set  mck_tab4a_&end8. mck_raw.mck_tab4a_&end7. run; 

the dot marks end of macro variable. used when macro text combined static text, e.g. in filename, sas knows macro variable ends. e.g.:

%let year=2017;  %let filename = &year._accounts.xlsx;  %put &filename; 

produces 2017_accounts.xlsx

without first dot, sas produce warning message, because looking macro variable called year_accounts. (it can't tell macro ends , text starts).

if there space or end of statement after macro variable dot can omitted. including dot has no effect in case. people think include dot.


Comments

Popular posts from this blog

angular - Ionic slides - dynamically add slides before and after -

minify - Minimizing css files -

Add a dynamic header in angular 2 http provider -