BookmarkSubscribeRSS Feed
MarkWik
Quartz | Level 8


Hi,

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.

Regards,

Mark

3 REPLIES 3
Reeza
Super User

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 lexjansen.com for macros that summarize data.

Cynthia_sas
SAS Super FREQ

Hi:

  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:

https://support.sas.com/resources/papers/proceedings13/120-2013.pdf

and

http://www2.sas.com/proceedings/sugi28/056-28.pdf

cynthia

Ksharp
Super User

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

sas-innovate-2024.png

Join us for SAS Innovate April 16-19 at the Aria in Las Vegas. Bring the team and save big with our group pricing for a limited time only.

Pre-conference courses and tutorials are filling up fast and are always a sellout. Register today to reserve your seat.

 

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.

Click image to register for webinarClick image to register for webinar

Classroom Training Available!

Select SAS Training centers are offering in-person courses. View upcoming courses for:

View all other training opportunities.

Discussion stats
  • 3 replies
  • 416 views
  • 0 likes
  • 4 in conversation