The following SAS program is submitted:
data temp;
set sasuser.history(kep=date);
format date qtr
<insert BY statement here>
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?
Answer : A
Which statement(s) in the DATASETS procedure alter(s) the name of a SAS data set stored in a SAS data library?
Answer : C
Given has SAS dataset ONE:
Answer : B
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;
<insert BY statement here>
run;
Which BY statement completes the program, creates a listing report that is grouped by X and completes without errors?
Answer : A
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;
<insert Where statement here>
run;
Which WHERE statement successfully completes the program and produces a report?
Answer : B
Following SAS program is submitted:
data temp(<insert option here>);
infile 'rawdata';
input x $ y z;
run;
RAWDATA is a file reference to an external file that is ordered by the variable X.
Which option specifies how the data in the SAS data set TEMP will be sorted?
Answer : C
Given the following partial SAS log:
NOTE: SQL table SASHELP.CLASS was created line
Create table SASHELP.CLASS(bufsize=4096)
(
Name char(8);
Gender Char(1);
Age num;
Height num;
Weight num -
);
Which SQL procedure statement generated this output?
Answer : A
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?
Answer : D
Given the SAS data set ONE:
ONE -
REP COST -
SMITH 200 -
SMITH 400 -
JONES 100 -
SMITH 600 -
JONES 100 -
The following SAS program is submitted:
Proc sql;
Select rep, avg(cost) as AVERAGE
From one -
Group by rep -
<insert SQL procedure clause here>
quit;
The following output is desired:
Answer : B
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;
<insert WHERE statement here>
run;
Which WHERE statement successfully completes the program and procedures a report?
Answer : D
Given the SAS dataset ONE -
ONE -
SALARY -
200
205
523
The following SAS program is submitted
Proc sql;
Select * from one -
<Insert Where expression here>;
quit;
The following output is desired:
SALARY -
200
205
523
Which WHERE expression completes the program and generates the desired output?
Answer : C
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?
Answer : D
The following SAS program is submitted:
%let value=9;
%let add=5;
%let newval=%eval(&value/&add);
What is the value of the macro variable NEWVAL?
Answer : C
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;
<insert By statement here?
Run;
Which by statement completes the program, create a listing report that is grouped by X and completes without errors?
Answer : C
Which of the following is true about the COMPRESS=YES data set option?
Answer : D
Have any questions or issues ? Please dont hesitate to contact us