Question 1:
The answer is (b).
There are, in total, four variables. The variables are FNAME, AGE, SALARY and TOTSAL.
Question 2:
The answer is (d).
The NAME variable from the SALARY data set has to be renamed as FNAME before the merge.
Question 3:
The answer is (c).
The two input data sets are not sorted by the FNAME variable before being merged. This causes a syntax error.
Question 4:
The answer is (b).
The data set is created in the TEMP library which is a permanent library.
Question 5:
The answer is (a).
The two data sets are merged by the NAME variable. Each data set contains two employees: Bruce and Dan.
There are no mismatched names or observations.
When the two data sets are merged, the output contains four observations. All of the observations are kept in the output data set.
Question 6:
The answer is (b).
The IF statement in this question keeps only the mismatched observations between the two data sets. The mismatched observations are from ID (1864) from the EMP_NAME data set and ID (3567) from the EMP_DEPT data set.
The output data set contains two observations.
Question 7:
The answer is (d).
The condition that identifies the non-matches are:
if ins=0 or inp=0;
Question 8:
The answer is (a).
The SET statement concatenates the PEOPLE and MONEY data sets. When concatenating data sets, each observation is contributed by a single data set.
The IF statement attempts to keep only the observations that are contributed by both input data sets. As a result, there is no observation in the output.
Question 9:
The answer is (c).
You need the RENAME data set option to rename the LOCATION variable as STATE. You also need the (in=) data set option to ensure only the matched observations are kept in the output.
Cookie | Duration | Description |
---|---|---|
cookielawinfo-checkbox-analytics | 11 months | This cookie is set by GDPR Cookie Consent plugin. The cookie is used to store the user consent for the cookies in the category "Analytics". |
cookielawinfo-checkbox-functional | 11 months | The cookie is set by GDPR cookie consent to record the user consent for the cookies in the category "Functional". |
cookielawinfo-checkbox-necessary | 11 months | This cookie is set by GDPR Cookie Consent plugin. The cookies is used to store the user consent for the cookies in the category "Necessary". |
cookielawinfo-checkbox-others | 11 months | This cookie is set by GDPR Cookie Consent plugin. The cookie is used to store the user consent for the cookies in the category "Other. |
cookielawinfo-checkbox-performance | 11 months | This cookie is set by GDPR Cookie Consent plugin. The cookie is used to store the user consent for the cookies in the category "Performance". |
viewed_cookie_policy | 11 months | The cookie is set by the GDPR Cookie Consent plugin and is used to store whether or not user has consented to the use of cookies. It does not store any personal data. |