Answers

Question 1:
The answer is (a).

The LOAD variable does not exist in the AIRPLANES data set. However, it is referenced in the KEEP data set option in the input AIRPLANES data set. This causes a syntax error.

Question 2:
The answer is (a).

There are five variables kept in the input SASDATA.cities:

  • orig
  • dest
  • city
  • price
  • equipment

The variables city, dest, equipment are dropped from the LABDATA.DALLAS data set.

Only the orig and price variables are output to both data sets.

Question 3:
The answer is (b).

The variable JOBCODE is kept in the DEPT1 data set. The JCODE variable is renamed as JOBCODE in the DEPT2 data set.

Both data sets contain the JOBCODE variable and it is written to the output data set.

Question 4:
The answer is (b).

The code in (b) contains the correct syntax.

Question 5:
The answer is (d).

The syntax in the KEEP statement (i.e. keep = product sales) is incorrect. 

Question 6:
The answer is (b).

The number of observations equal to (OBS - FIRSTOBS + 1). It is (499 - 75 + 1) = 425.