BookmarkSubscribeRSS Feed
3 REPLIES 3
andreas_lds
Jade | Level 19

Welcome in the community!

This looks like homework, so please share what you have already tried, also please note that hardly anyone will provide working code, when no usable data is supplied.

tarheel13
Rhodochrosite | Level 12

You need to use rename statement. You can look that up in the documentation. 

Interleaving means you will have: set hurricane1 hurricane2; by name;

To merge, you have to sort both by name and then do merge hurricane1 hurricane2; by name;

tarheel13
Rhodochrosite | Level 12

In the future, people want you to post data like this: 

data hurricane1;
input name $ year death_toll;
datalines;
Katrina 2005 1200
Andrew 1992 23
Charley 2004 10
Wilma 2005 5
Ivan 2004 25
Rita 2005 7
Frances 2004 6
Hugo 1989 21
Jeanne 2004 5
Floyd 1999 56
;
proc print;
run;

data hurricane2;
input storm $ wind_speed storm_surge season;
datalines;
Katrina 125 26 2005
Andrew 145 17 1992
Charley 120 7 2004
Wilma 112 7 2005
Ivan 120 12 2004
Rita 115 7 2005
Frances 105 6 2004
Hugo 135 15 1989
Jeanne 120 5 2004
Floyd 100 9 1989
;
proc print;
run;

hackathon24-white-horiz.png

The 2025 SAS Hackathon has begun!

It's finally time to hack! Remember to visit the SAS Hacker's Hub regularly for news and updates.

Latest Updates

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