data data3;
set data1 data2;
run;
From my understanding, if data1 and data2 have 10 observations respectively, data3 should return 20 observations. However, after running the statement, I get only 15 observations.
Let's say those two datasets are actually datasets about students. One student with student id=1 has 4 observations in data1 and 1 observation in data2. After running the data step, I get the records that belong to student id=1 all deleted in data3.
Can anyone please help figuring out why this might be?
Please provide us with the data sets used (or a reasonable fraction of them that illustrates the problem). Use these instructions: How to create a data step version of your data AKA generate sample data for forums
Also please show us the EXACT code that is being used.
It's finally time to hack! Remember to visit the SAS Hacker's Hub regularly for news and updates.
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.
Ready to level-up your skills? Choose your own adventure.