Given the following SAS data set SASUSER.HIGHWAY:
SASUSER.HIGHWAY
STEERING SEATBELT SPEED STATUS COUNT
------------------------------------------------------------------------ absent no 0-29 serious 31
absent no 0-29 not 1419
absent no 30-49 serious 191
absent no 30-49 not 2004
absent no 50+ serious 216
The following SAS program is submitted:
%macro highway;
proc sql noprint;
select count(distinct status)
into :numgrp
from sasuser.highway;
%let numgrp = andnumgrp;
select distinct status
into :group1-:groupandnumgrp
from sasuser.highway;
quit;
%do i = 1 %to andnumgrp;
proc print data = sasuser.highway;
where status = "andandgroupandi" ;
run;
%end;
%mend;
%highway
How many reports are produced by the above program?
A. 0
B. 1
C. 2
D. 5
Which one of the following statements is true regarding a SAS DATA step view?
A. It allows write capabilities.
B. It contains global statements.
C. It contains data and a descriptor portion.
D. It contains a partially compiled DATA step.
The following SAS program is submitted:
proc sql;
select *
from dictionary.tables;
quit;
Which one of the following is reported?
A. metadata on all tables in all libraries
B. metadata on all tables in the WORK library only
C. metadata on all tables in the SASUSER library only
D. metadata on all tables in the DICTIONARY library only
Given the following SAS data sets ONE and TWO:
ONE TWO OBS COMMON X OBS COMMON Y -------------------------- ------------------------------ 1 A 10 1 A 1 2 A 13 2 A 3 3 A 14 3 B 4 4 B 9 4 B 2 5 C 8 5 C 5 6 C 14
The following SAS DATA step is submitted: data combine; set one; set two; run; Which one of the following represents the data values stored in data set COMBINE?
A. OBS COMMON X Y
1 A 10 1
2 A 13 3
3 A 14 3
4 B 9 4
5 B 9 2
6 C 8 5
7 C 14 5
B. OBS COMMON X Y
1 A 10 1
2 A 13 3
3 B 9 4
4 C 8
C. OBS COMMON X Y
1 A 10 1
2 A 13 3
3 B 14 4
4 B 9 2
5 C 8 5
D. OBS COMMON X Y
1 A 10 1
2 A 13 1
3 A 14 1
4 A 10 3
5 A 13 3
6 A 14 3
7 B 9 4
8 B 9 2
9 C 8 5
10 C 14 5
The following SAS program is submitted:
%macro test(var);
%let jobs = BLACKSMITH WORDSMITH SWORDSMITH;
%let type = %index(andjobs,andvar);
%mend;
%test(SMITH)
Which one of the following is the resulting value of the macro variable TYPE?
A. 0
B. 3
C. 6
D. null
Which one of the following is an advantage of creating and using a SAS DATA step view?
A. It can store an index.
B. It always accesses the most current data.
C. It works quickly through multiple passes of the data.
D. It is useful when the underlying data file structure changes.
Given the following SAS data sets ONE and TWO:
ONE TWO
YEAR QTR BUDGET YEAR QTR SALES
------------------------------- ----------------------------- 2001 3 500 2001 4 300
2001 4 400 2002 1 600
2002 1 700
The following SAS program is submitted:
proc sql;
select one.*, sales
from one left join two
on one.year = two.year;
quit;
Which one of the following reports is generated?
A. YEAR QTR BUDGET SALES 2001 3 500 .
B. YEAR QTR BUDGET SALES
2001 4 400 300
2002 1 700 600
C. YEAR QTR BUDGET SALES
2001 3 500 .
2001 4 400 300
2002 1 700 600
D. YEAR QTR BUDGET SALES
2001 3 500 300
2001 4 400 300
2002 1 700 600
Given the following SAS data set ONE:
ONE COUNTRY CITY VISIT
USA BOSTON 10
UK LONDON 5
USA DALLAS
UK MARLOW 10
USA BOSTON 20
UK LONDON 15
USA DALLAS 10
The following SAS program is submitted:
proc sql;
select country, city, sum(visit) as TOTAL
from one group by country, city order by country, total desc; quit;
Which one of the following reports is generated?
A. COUNTRY CITY TOTAL
UK MARLOW 10
UK LONDON 20
USA BOSTON 50
USA DALLAS 20
B. COUNTRY CITY TOTAL
UK LONDON 20
UK MARLOW 10
USA BOSTON 50
USA DALLAS 20
C. COUNTRY CITY TOTAL
USA BOSTON 50
USA DALLAS 20
UK LONDON 20
UK MARLOW 10
D. COUNTRY CITY TOTAL
UK MARLOW 10
UK LONDON 20
USA DALLAS 20
USA BOSTON 50
Given the following SAS data set SASUSER.HIGHWAY:
SASUSER.HIGHWAY
STEERING SEATBELT SPEED STATUS COUNT
-------------------------------------------------------------------------- absent no 0-29 serious 31
absent no 0-29 not 1419
absent no 30-49 serious 191
absent no 30-49 not 2004
absent no 50+ serious 216
The following SAS program is submitted:
%macro highway;
proc sql noprint;
select count(distinct status)
into :numgrp
from sasuser.highway;
%let numgrp = andnumgrp;
select distinct status
into :group1-:groupandnumgrp
from sasuser.highway;
quit;
%do i = 1 %to andnumgrp;
proc print data = sasuser.highway;
where status = "andandgroupandi" ;
run;
%end;
%mend;
%highway
How many reports are produced by the above program?
A. 0
B. 1
C. 2
D. 5D.5
Which one of the following techniques concatenates data in SAS?
A. the APPEND procedure
B. the DATA step with a MERGE statement
C. the DATA step with a COMBINE statement
D. the INTERSECT operator in the SQL procedure