2 weeks ago
I have 2 datasets with the exact same variables but a slightly different order. I want to combine these 2 datasets but am not sure if the variable order matters when using proc append.
If the variable order does matter, what are my options for combining the 2 datasets correctly without having to reorder the columns? There are a lot of columns so reordering would take a lot of time.
2 weeks ago
Order shouldn't matter.
What will matter are variable types: variable x in the base set has to be the same type, numeric or character in both sets.
If the variable is character length might have an effect and will generate error messages and might require the FORCE option. The BASE data set length will be maintained in that case so stuffing 18 characters into 3 likely results in truncated (read: incomplete) data for those variables.
A variable in the base set may be missing in the appended data and generate a warning. A variable in the appended data that does not exist in the base data will generate and Error. Force will allow appending the data but the new variable(s) will not be added to the set.