BookmarkSubscribeRSS Feed
Emma8
Quartz | Level 8

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. 

2 REPLIES 2
ChrisNZ
Tourmaline | Level 20

Couldn't you add

proc append base=RESULT data=STDRATE; run;

after your the step shown?

PaigeMiller
Diamond | Level 26

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?

--
Paige Miller

SAS Innovate 2025: Call for Content

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!

Submit your idea!

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
  • 2 replies
  • 484 views
  • 0 likes
  • 3 in conversation