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
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.

SAS Training: Just a Click Away

 Ready to level-up your skills? Choose your own adventure.

Browse our catalog!

Discussion stats
  • 2 replies
  • 772 views
  • 0 likes
  • 3 in conversation