hi I have marco that is creating proc summary statement . I wanted to scale in output everything by a number like 2 or 3 . like in below program I want to multiply outdata with a number like 2 or 3 based on I will create a macro on top with %let statement . can anyone help please .
output out= outdata (drop=_type_ _freq_) sum=;
run;
You use a data step on the output data from your proc summary.
data want;
set outdata;
<calculations go here>
;
hi this is my programe where should I use
macro d1(name, list)
proc summary data=total nway missing
var &list
output out= data1 (drop=_type_ _freq_) sum=
run
mend d1
@SASUser0001 wrote:
hi this is my programe where should I use
macro d1(name, list)
proc summary data=total nway missing
var &list
output out= data1 (drop=_type_ _freq_) sum=
run
mend d1
Please help us all out and don't post code that doesn't have semi-colons and doesn't have % signs on the macro commands and has other obvious syntax errors. Please use the "running man" icon and post your code in the window that appears.
Also, @ballardw has already explained that you need to do the multiplication in a data step after your PROC SUMMARY, and he has given example code. Give that a try.
Are you ready for the spotlight? We're accepting content ideas for SAS Innovate 2025 to be held May 6-9 in Orlando, FL. The call is open until September 25. Read more here about why you should contribute and what is in it for you!
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.