BookmarkSubscribeRSS Feed
cris17
Calcite | Level 5

Hi SAS communities,

 

I match merged 4 data sets into one. There should only be 1 observation per person, which includes the most recent visit. One data set had a Birth Date variable and another data set had a Visit Date variable. After merging all 4 I then had to create a new variable that shows what age the person was between Birth date and Visit Date. Below is my code and I think I did the code correctly, but in the log, it shows that 2 out of the 573 are missing data. I checked the data sets and they show both the Birth date and Visit date. It could possibly be the way I also made the 4 data sets, but want to know ifs a simple coding mistake. Below is my code and a screenshot of the partial log.

 

 

Screen Shot 2020-12-06 at 6.43.32 PM.png

 

Let me know if you need more information

Thank you.

1 REPLY 1
PaigeMiller
Diamond | Level 26

The log clearly shows that VisitDt is missing for these two observations.

 

it may be that when you merge these data sets, a missing VisitDt in one data set overwrites a non-missing VisitDt from another data set.

 

In the future, please post log as text (not screen capture) by pasting it into the window that appears when you click on the </> icon.

--
Paige Miller

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

SAS Enterprise Guide vs. SAS Studio

What’s the difference between SAS Enterprise Guide and SAS Studio? How are they similar? Just ask SAS’ Danny Modlin.

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