Methods of Combining Sas Datasets: Concatenation(set statment), Merge Statement:
Concatenating combines two or more SAS data sets, one after the other, into a single SAS data set.
- Use the SET statement in a DATA step to concatenate SAS data sets.
- Any number of SAS data sets can be read with a single SET statement.
Merging combines observations from two or more SAS data sets into a single observation in a new data set.
Set : only support data without relation, with relation i.e
by statement it will produce error if we right like merge
It will produce the result same as merge , with or without
EX : data demo;
set dm1 dm2;
It will produce error.
Merge : it will combine the datasets with or without
The only difference is set is not more efficient to combine
the datasets as we need to write set statement everytime.
Merge (without relation)
merge dm1 dm2;
Merge (with relation)
merge dm1 dm2;
by <variable name>
Set and merge statement perform similar function, in case
of set statement, the two data sets are merged under
unconditional criteria, but while using merge, it works
under conditional criteria by applying the PROC SORT
procedure ., i.e., by statement used.
How do you debug and test your SAS programs?
What can you learn from the SAS log when debugging?
How do you test for missing values?
How would you create multiple observations from a single
What are some good SAS programming practices for processing
very large data sets?
Briefly describe 5 ways to do a "table lookup" in SAS.
Why is SAS considered self-documenting?
Are you sensitive to code walk-throughs, peer review, or QC
What other SAS features do you use for error trapping and
How does SAS handle missing values in: assignment
statements, functions, a merge, an update, sort order,