Exam A00-211 All QuestionsBrowse all questions from this exam
Question 59

Given the data sets below:

WORK.EMP with variables:

WORK.NEWHIRE with variables:

The following SAS program is submitted:

The SAS data set WORK.EMP has 50 observations, and the data set WORK.NEWHIRE has 4 observations.

How many variables will the data set WORK.ALLEMP contain?

    Correct Answer: A

    The data set WORK.ALLEMP will contain 3 variables. This is because the SET statement in SAS combines data sets by stacking them one after the other, and it will keep the variables that are common between the two data sets. WORK.EMP has variables EmpID, Name, and Salary, while WORK.NEWHIRE has variables EmployeeID, Name, and Salary. Although EmpID and EmployeeID have different names, the SET statement does not merge on name matching but rather by observing the structure of the variable positions. Therefore, only the common variables by their actual structure (Name and Salary) will be included, but not EmployeeID as a separate variable.

Discussion
ExamHWOption: D

d is correct