DATA Step, Macro, Functions and more

Using PROC PRINT to print only those variables whose name contains a certain prefix

Accepted Solution Solved
Reply
Regular Contributor
Posts: 199
Accepted Solution

Using PROC PRINT to print only those variables whose name contains a certain prefix

I'd like to use PROC PRINT to print a group of variables that all share a common prefix. Is there a simple way to do that?

 

Thanks!


Accepted Solutions
Solution
‎02-22-2016 04:10 PM
Trusted Advisor
Posts: 1,115

Re: Using PROC PRINT to print only those variables whose name contains a certain prefix

proc print data=test;
var abc:;
run;

(if "abc" is the prefix)

View solution in original post


All Replies
Super User
Posts: 17,744

Re: Using PROC PRINT to print only those variables whose name contains a certain prefix

Solution
‎02-22-2016 04:10 PM
Trusted Advisor
Posts: 1,115

Re: Using PROC PRINT to print only those variables whose name contains a certain prefix

proc print data=test;
var abc:;
run;

(if "abc" is the prefix)

☑ This topic is SOLVED.

Need further help from the community? Please ask a new question.

Discussion stats
  • 2 replies
  • 176 views
  • 2 likes
  • 3 in conversation