Hi,
Using https://www.lexjansen.com/sesug/2015/76_Final_PDF.pdf as a starting point, I have
ods output variables = proc_vars;
proc contents data=par_dat._all_;
run;
proc sort data=proc_vars;
by member num;
run;
options nobyline;
ODS EXCEL FILE="&xpt.par_dat_contents.xlsx"
options(sheet_name="#BYVAL(member)"
embedded_titles='yes');
proc print data=proc_vars noobs;
by member;
pageby member;
title "Variables in #BYVAL(member) table";
run;
ODS EXCEL CLOSE;
I don't actually want the proc contents of all of the datasets, but only the ones that end in 20210720 (where=(memname like '%20210720')). How can the code be updated to limit the output? Thanks in advance.
Why not just use this?
proc print data=PROC_VARS(where=(MEMNAME like '%20210720')) noobs;
Why not just use this?
proc print data=PROC_VARS(where=(MEMNAME like '%20210720')) noobs;
Thanks, update memname to member and it works.
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.