BookmarkSubscribeRSS Feed
Oversea_rep
Calcite | Level 5

Hello,

 

I'm trying to combine multiple datasets across several years (17/18, 18/19, etc) but first, I want to create a new variable with season, household id and participant number e.g. 171800101 such that the index case in the first household enrolled in 1718 season (other members would be 02, 03, 04, etc.) and household number would be three digits (001, 002, ...188, etc) and the seasons would be 4 digits (1718, 1819, 1920). The variables are not already in the dataset. How do I create them for each of the dataset and merge by this common new variable?

1 REPLY 1
PaigeMiller
Diamond | Level 26

Please provide us with (a small portion of) your data sets. Please follow these instructions. (Do not attach files or provide data as a screen capture)

--
Paige Miller

SAS Innovate 2025: Save the Date

 SAS Innovate 2025 is scheduled for May 6-9 in Orlando, FL. Sign up to be first to learn about the agenda and registration!

Save the date!

Mastering the WHERE Clause in PROC SQL

SAS' Charu Shankar shares her PROC SQL expertise by showing you how to master the WHERE clause using real winter weather data.

Find more tutorials on the SAS Users YouTube channel.

Discussion stats
  • 1 reply
  • 398 views
  • 1 like
  • 2 in conversation