BookmarkSubscribeRSS Feed
jomag
Obsidian | Level 7

Hello All,

 

I have two large datasets(a baseline file (approx 64,000 observations) and an endpoint file (approx 33,000 observations)) of repeated observations that I would like to merge based on a few conditions:

 

1. They should be of the same study id

2. They should have the same start year

3. The day when endpoint occurred must be the same as study start day or end day or within that period (for a row)

 

I am attaching an example of how these two files look like and how I would like them to look after merging.

 

Definitions of the variables are:

 

Begin day= Number of days from start year

End day = Number of days from start year

1 REPLY 1
LinusH
Tourmaline | Level 20
1. Supply sample data in dorm of a data step w DATALINES.
2. Describe what you have tried so far.
Data never sleeps

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
  • 1 reply
  • 752 views
  • 0 likes
  • 2 in conversation