Computing simple Descriptive/Summary stats?

Frequent Contributor
Posts: 105

Computing simple Descriptive/Summary stats?


I have 36 different datasets and I am in need to

1.  compute the entire descriptives such as mean, min,max, standard deviation etc like proc means for all numeric variables in each dataset and do a  Boxplot?

2. Count/ establish frequency for all character variables  in each dataset?

3. Route the output to a ODS pdf file format report.

what is the best solution/proc.I seek an expert help in establishing an optimised way to compute without having to write a 36 proc steps, which is rather tedius considering what if i have 100 tables in future. How to loop and macrotise it? An example with a code would be of great help.



Super User
Posts: 23,778

Re: Computing simple Descriptive/Summary stats?

Do you have the code for one iteration? Do you have a naming convention for your datasets, how do you identify which need to be summarized?

You can search at for macros that summarize data.

Posts: 9,373

Re: Computing simple Descriptive/Summary stats?


  Reeza is correct. Before you "macrotise" a program, you have to have at least 1 working program as a model of the code you want to generate. So the place to start, when you want to "macrotise" a process so it is repeatable is with a working SAS program.

  These papers might help you get started using SAS macro variables and writing simple SAS Macro programs:



Super User
Posts: 10,787

Re: Computing simple Descriptive/Summary stats?

make a macro contains proc means to get what you need ,then use call execute to go through all of these 36 tables.

Ask a Question
Discussion stats
  • 3 replies
  • 4 in conversation