The following SAS program is submitted:
%macro check(num=4);
%let result=%eval(&nm gt 5);
%put result is &result;
%mend;
%check (num=10)
What is written to the SAS log?
The SAS data set ONE consists of five million observations and has 25 variables.
Which one of the following SAS programs successfully creates three new variables
TOTREV, TOTCOST, and PROFIT and requires the least CPU time to be processed?
The following are values of the variable STYLE from the SAS data set
SASUSER.HOUSES:
SASUSERS.HOUSES
OBS STYLE
1 RANCH
2 SPLIT
3 CONDO
4 TWOSTORY
5 RANCH
6 SPLIT
7 SPLIT
The following SAS program is submitted:
proc sql noprint;
select distinct style
into :styles separated by ' '
from sasuser.houses
order by style;
quit;
Which one of the following is the value of the resulting macro variable?
Given the SAS data set WORK TRANSACT:
The following output is desired:
Which SQL statement was used?
The following SAS program is submitted:
options mprint;
%macro test(parm);
proc &parm data = sashelp.prdsale;
run;
%mend;
%test(print)
What is the result of the MPRINT options?
The SAS data set ONE contains the variables X,Y,Z and W.
The following SAS program is submitted:
Proc transpose data =one
Out=trans
Name=new;
By x;
var y;
run;
What are the names of all of the columns created by the TRANSPOSE procedure?
Given the following SAS data set ONE:
ONE
JOB LEVEL SALARY
ACC 2 300
SEC 1 100
SEC 2 200
MGR 3 700
ACC 1 .
ACC 3 .
MGR 2 400
The following SAS data set TWO is created:
TWO
JOB LEVEL BONUS
ACC 2 30
MGR 3 70
MGR 2 40
Which one of the following SAS programs creates data set TWO?
Which one of the following displays the definition of a stored SQL procedure view in the
SAS log?
At the start of a new SAS session; the following program is submitted:
%macro one;
data _null_;
call symput('proc','measn);
run;
proc &proc data=sashelp.class;
run;
%mend;
%one()
What is the result?
The following SAS code is submitted:
%macro houses(dsn = houses,sub = RANCH);
data &dsn;
set sasuser.houses;
if style = "¬";
run;
%mend;
%houses(sub = SPLIT)
%houses(dsn = ranch)
%houses(sub = TWOSTORY)
Which one of the following is the value of the automatic macro variable SYSLAST?
The following SAS program is submitted:
%let dept=prod;
%let prod=merchandise;
The following message is written to the SAS log:
The value is "merchandise"
Which SAS System option writes this message to the SAS log?
Given the non-indexed SAS data set TEMP:
TEMP
X Y
P 52
P 45
A 13
A 56
R 34
R 12
R 78
The following SAS program is submitted:
Proc print data=temp;
Run; Which by statement completes the program, create a listing report that is grouped by X and completes without errors?
The following SAS program is submitted:
%macro execute;
proc print data = sasuser.houses;
run;
%end;
%mend;
Which of the following completes the above program so that it executes on Tuesday?
Which one of the following statements is true regarding a SAS DATA step view?
The following SAS program is submitted:
%let var = chicago, 1;
data a;
var = 'new york, 2';
newvar = %scan(&var,2,%str());
run;
Which one of the following explains why the program fails to execute?
The following SAS program is submitted:
data one;
do i = 1 to 10;
ptobs = ceil(ranuni(0) * totobs);
set temp point = ptobs
nobs = totobs;
output;
end;
stop;
run;
The SAS data set TEMP contains 2,500,000 observations. Which one of the following represents the possible values for PTOBS?
Which one of the following is an advantage of creating and using a SAS DATA step view?
The following SAS program is submitted:
%macro test(var);
proc print data = sasuser.class;
where age > &var;
run;
%mend;
Which type of parameter is the macro variable VAR?
Given the data set SASHELP.CLASS:
SASHELP.CLASS
NAME AGE
Mary 15
Philip 16
Robert 12
Ronald 15
The following SAS program is submitted:
%let value = Philip;
proc print data = sashelp.class;
run;
Which WHERE statement successfully completes the program and procedures a report?
The following SAS program is submitted:
options yearcutoff = 1950;
%macro y2kopt(date);
%if &date >= 14610 %then %do;
options yearcutoff = 2000;
%end;
%else %do;
options yearcutoff = 1900;
%end;
%mend;
data _null_ ;
date = "01jan2000"d;
call symput("date",left(date));
run;
%y2kopt(&date)
The SAS date for January 1, 2000 is 14610 and the SAS system option for
YEARCUTOFF is set to 1920 prior to submitting the above program.
Which one of the following is the value of YEARCUTOFF when the macro finishes execution?
Given the two output sets shown on the left, which program produced the output shown on the right?
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?
Which one of the following is true regarding the KEEP statement?
The variable attributes of SAS data sets ONE and TWO are shown below:
ONE TWO
# Variable Type Len Pos # Variable Type Len Pos
2 sales Num 8 8 2 budget Num 8 8
1 year Num 8 0 3 sales Char 8 16
1 year Num 8 0
Data set ONE contains 100 observations. Data set TWO contains 50 observations. Both data sets are sorted by the variable YEAR.
The following SAS program is submitted:
data three;
merge one two;
by year;
run;
Which one of the following is the result of the program execution?
Which option forces the use of a specific index from a data set?
The following SAS program is submitted:
options reuse=YES;
data sasuser RealEstate(compress=CHAR);
set sasuser houses;
run;
What is the effect of the REUSE=YES SAS system option?
The following SAS program is submitted:
proc sql;
select *
from dictionary.tables;
quit;
Which one of the following is reported?