Write a Macro for Proc Univariate for multiple variables

Accepted Solution Solved
Reply
Contributor
Posts: 31
Accepted Solution

Write a Macro for Proc Univariate for multiple variables

I have data that has more than 20 variables

 

How to write a Macro that would repeat the following code that only processes one varible at a time?

 

Proc Univariate Data=mydata;

        var variable1;

        histogram;

run;

 

Thank you


Accepted Solutions
Solution
‎01-24-2016 01:53 PM
Super Contributor
Posts: 490

Re: Write a Macro for Proc Univariate for multiple variables

You do not need macro for that. You can specify range in var statment like

Proc Univariate Data=mydata;
        var variable1 -- variableN;
        histogram;
run;

 

View solution in original post


All Replies
Solution
‎01-24-2016 01:53 PM
Super Contributor
Posts: 490

Re: Write a Macro for Proc Univariate for multiple variables

You do not need macro for that. You can specify range in var statment like

Proc Univariate Data=mydata;
        var variable1 -- variableN;
        histogram;
run;

 

☑ This topic is solved.

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

Discussion stats
  • 1 reply
  • 464 views
  • 1 like
  • 2 in conversation