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.
Let me know if you need more information
Thank you.
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.
April 27 – 30 | Gaylord Texan | Grapevine, Texas
Walk in ready to learn. Walk out ready to deliver. This is the data and AI conference you can't afford to miss.
Register now and lock in 2025 pricing—just $495!
Get started using SAS Studio to write, run and debug your SAS programs.
Find more tutorials on the SAS Users YouTube channel.
Ready to level-up your skills? Choose your own adventure.