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.
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!
Still thinking about your presentation idea? The submission deadline has been extended to Friday, Nov. 14, at 11:59 p.m. ET.
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.