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.
Available on demand!
Missed SAS Innovate Las Vegas? Watch all the action for free! View the keynotes, general sessions and 22 breakouts on demand.
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.
Select SAS Training centers are offering in-person courses. View upcoming courses for: