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.
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 lock in 2025 pricing—just $495!
Still thinking about your presentation idea? The submission deadline has been extended to Friday, Nov. 14, at 11:59 p.m. ET.
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.