Hello. Can anyone help with the following?
I would like to create one report table for multiple datasets:
proc stdrate data=&MULTIPLEDATA (here I would like to loop through multuple dataset, for example data 1 and data 2)
refdata=&REFDATA(This should unique for each dataset, for example data 1 this refdata=female and for data 2 this refdata=male)
method=direct
stat=rate (mult=100000);
population event=&EVENTS(this also unique for each data as& refdata) total=&population (this also unque for each data as refdata);
reference total=&REF_DATA(also unique for each data);
strata agegroup;
by &VRBL(also unique for each data) notsorted;
ods output StdRate=StdRate;
run;
How can I do that (each data would contain their unique variable and REFDATA also unique data for a given REFDATA.
Thank you.
Couldn't you add
proc append base=RESULT data=STDRATE; run;
after your the step shown?
So you want to write a loop.
How do we know what the values in &MULTIPLEDATA are that we need to loop through? How do we know the values of &EVENTS are? And so on.
Whwere is this information stored?
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.