I have a question about the function of "_:"
data all_claims;
set dataset1
dataset2
dataset3_:;I don't see a dataset entitled "dataset3_:" elsewhere in the code, though I do something close to it.
%macro dataset3 (year_start=, year=);
data dataset3&YEAR. (where=(mdy(12,31,&YEAR_START.)<svcdate<=mdy(12,31,&YEAR.)));
set have;
rename date1=date2;
run;
proc means data=dataset3&YEAR. noprint nway missing;
class var1 var2 var3;
var var5 var6;
output out=clean.dataset3_&YEAR. (drop=_:) sum=;
run;
%mend dataset3; Any idea what dataset3_: is in reference to?
What's important here is the colon after dataset3_ - that means all data sets starting with the name "dataset3_" like so
data dataset3_2015;
set sashelp.class;
run;
data dataset3_2016;
set sashelp.class;
run;
data dataset3_2017;
set sashelp.class;
run;
data want;
set dataset3_:;
run;
What you end up with it all three data sets appended
What's important here is the colon after dataset3_ - that means all data sets starting with the name "dataset3_" like so
data dataset3_2015;
set sashelp.class;
run;
data dataset3_2016;
set sashelp.class;
run;
data dataset3_2017;
set sashelp.class;
run;
data want;
set dataset3_:;
run;
What you end up with it all three data sets appended
April 27 – 30 | Gaylord Texan | Grapevine, Texas
Walk in ready to learn. Walk out ready to deliver. This is the data and AI conference you can't afford to miss.
Register now and save with the early bird rate—just $795!
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.