BookmarkSubscribeRSS Feed
🔒 This topic is solved and locked. Need further help from the community? Please sign in and ask a new question.
kb011235
Obsidian | Level 7

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.

 

1 ACCEPTED SOLUTION

Accepted Solutions
ChrisNZ
Tourmaline | Level 20

Why not just use this?

proc print data=PROC_VARS(where=(MEMNAME like '%20210720')) noobs;

 

View solution in original post

2 REPLIES 2
ChrisNZ
Tourmaline | Level 20

Why not just use this?

proc print data=PROC_VARS(where=(MEMNAME like '%20210720')) noobs;

 

kb011235
Obsidian | Level 7

Thanks, update memname to member and it works. 

sas-innovate-2026-white.png



April 27 – 30 | Gaylord Texan | Grapevine, Texas

Registration is open

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!

Register now

How to Concatenate Values

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.

SAS Training: Just a Click Away

 Ready to level-up your skills? Choose your own adventure.

Browse our catalog!

Discussion stats
  • 2 replies
  • 1415 views
  • 2 likes
  • 2 in conversation