Hi,
This may sound simple but I need help.
I concatenate 2 dataset and the observations output seems fine.
Data 1 have 12316611 obs and187 columns
Data 2 have 12316611 obs and 86 columns
When I concatenate I got Total rows: 24633222 Total columns: 268 but I expected 273 column. Why is the number of variables is reduced. Could this be related to variables having different attributes. How do I resolve the issue. Thanks
Why would you expect there to be more than 187 variables? Are you saying that you expected NONE of the variables between the two datasets to be the same? Then why did you concatenate the datasets? They don't appear to have anything to do with each other.
As it is it appears that the second dataset have 268 - 187 = 81 variables that are NOT in the first dataset.
So there are only 5 variables that they have in common.
Show the code that you used to "concatenate" the data sets.
It sounds like you did a data step merge and that you have 5 variables (not "columns") with the same name in both sets.
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!
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.