7. Why D? I think A and D are both wrong.
Which one of the following programs contains a syntax error?
A. proc sql;
select product.*, cost.unitcost, sales.quantity
from product p, cost c, sale s
where p.item = c.item and p.item = s.item;
quit;
B. proc sql;
select product.*, cost.unitcost, sales.quantity
from product , cost , sale
where product.item = cost.item and product.item = sales.item;
quit;
C. proc sql;
select p.*, cost.unitcost, sales.quantity
from product as p , cost as c , sale as s
where p.item = c.item and p.item = s.item;
quit;
D. proc sql;
select p.*, cost.unitcost, sales.quantity
from product , cost , sale
where product.item = cost.item and product.item = sales.item;
quit;
14. Why D?
Consider the following SAS log:
229 data sasuser.ranch sasuser.condo / view = sasuser.ranch;
230 set sasuser.houses;
231 if style='RANCH' then output sauser.ranch;
232 else if style='CONDO' then output sasuser.condo;
233 run;
NOTE: DATA STEP view saved on file SASUSER.RANCH. NOTE:
A stored DATA STEP view cannot run under a different operating system.
234 235 proc print data = sasuser.condo;
ERROR: File sasuser.condo data does not exist.
236 run;
NOTE: The SAS system stopped processing this step because of errors.
Which one of the following explains why the PRINT procedure fails?
A. sasuser.condo is a stored DATA STEP program.
B. A SAS data file and SAS data view cannot be created in the same DATA STEP.
C. A second VIEW= sasuser.condo OPTION was omitted on the DATA statement.
D. The view sasuser.ranch must be processed before sasuser.condo is created.
[size=14.6667px]21. Why D not C?
[size=14.6667px]The following SAS program is submitted:
[size=14.6667px]%let lib = %upcase (sasuser);
[size=14.6667px]pro sql;
[size=14.6667px]select nvar from dictonary.tables
[size=14.6667px]where libname = "&lib";
[size=14.6667px]quit;
[size=14.6667px]Given that several SAS data sets exist in the SASUSER library, which one of the following is generated as output?
[size=14.6667px]A. no result set
[size=14.6667px]B. a syntax error in the log
[size=14.6667px]C. a report showing the names of each table in SASUSER
[size=14.6667px]D. a report showing the number of columns in each table in SASUSER