Which one of the following statements about compressed SAS data sets is always true?
The following SAS program is submitted:
data temp;
set sasuser.history(kep=date);
format date qtr
if first.date then total=0;
total+1;
if last.date;
run;
proc print data=temp;
run
SASUSER.HISTORY is sorted by the SAS date variable DATE.
The following output is required:
Date Total
1 13
3 15
4 25
Which By statement completes the data step and successfully generates the required output?
Given the following SAS data set named WORK.INTERNAT:
WORK.INTERNAT
LOCATION SUM
USA 30
EUR 40
The following SAS program is submitted:
%let LOC = Usa;
proc sql;
select *
from internat
where location = "&Loc";
quit;
Which one of the following is the result when the above code is executed on the above data set?
The following SAS program is submitted:
%let lib = %upcase(sasuser);
proc sql;
select nvar
from dictionary.tables
where libname = "&lib";
quit;
Given that several SAS data sets exist in the SASUSER library, which one of the following is generated as output?
Given the data set SASHELP.CLASS:
The following SAS program is submitted:
The PROC steps execute successfully?
Given has SAS dataset ONE:
The following SAS program is submitted:
Proc sql;
from one;
quit;
The following output is desired:
Which SQL procedure clause completes the program and generates the desired output?
Given the following SAS data set ONE:
ONE
LEVEL AGE
1 10
2 20
3 20
2 10
1 10
2 30
3 10
2 20
3 30
1 10
The following SAS program is submitted:
proc sql;
select level, max(age) as MAX
from one
group by level
having max(age) > (select avg(age) from one);
quit;
Which one of the following reports is generated?
This question will ask you to provide missing option.
Which option is required to complete the program correctly?
This question will ask you to provide a segment of missing code.
Given the SAS data set SASUSER.HIGHWAY:
The following SAS program is submitted:
Which SQL clause stores the text 0-29, 30-49, 60+ in the macro variable GROUPS?
Given a SAS data set with the following characteristics:
A SAS DATA Step program is written that will retrieve 20% of the data using a search based on a range of a character variable.
Which type of statement is the best choice to minimize computer resource utilization when subsetting this data?
Which SET statements option names a variable that contains the number of the observation to read during the current iteration of the DATA step?
The following SAS program is submitted:
%let a = cat;
%macro animal(a = frog);
%let a = bird;
%mend;
%animal(a = pig)
%put a is &a;
Which one of the following is written to the SAS log?
Given the following SAS data sets ONE and TWO:
ONE TWO
NUM CHAR1 NUM CHAR2
1 A 2 X
2 B 3 Y
4 D 5 V
The following SAS program is submitted creating the output table THREE:
data three;
set one two;
run;
THREE
NUM CHAR1 CHAR2
1 A
2 B
4 D
2 X
3 Y
5 V
Which one of the following SQL programs creates an equivalent SAS data set THREE?
Given the following SAS program:
proc sql;
select product, type, sum(sales) as revenue
from one
group by product, type;
quit;
Which one of the following clauses should be added to the program to sort the output by PRODUCT and decreasing REVENUE?
Given the SAS data set ONE:
ONE
NUM VAR
1 A
2 B
3 C
Which SQL procedure program deletes the data set ONE?
The following SAS program is submitted:
%let value = .5;
%let add = 5;
%let newval = %eval(&value + &add);
Which one of the following is the resulting value of the macro variable NEWVAL?
The following SAS program is submitted:
%micro test(var);
%let jobs=BLACKSMITH WORDSMITH SWORDSMITH;
%let type=%index(&jobs, &var);
%put type = &type;
%mend;
%test(SMITH)
What is the value of the macro variable TYPE when the %PUT statement executes?
This question will ask you to provide a segment of missing code.
Given data sets ONE and TWO with the same variables, the following SAS program is submitted:
In the text below, complete the following program so that it will produce the same results as the above program:
Case is ignored and standard SAS syntax rules apply.