Advanced SAS Certification Questions Part-1

Real Time Advanced SAS Certification Questions and Online Practice Exams

01. Given the following SAS data sets ONE and TWO: 

SAS Certifications Questions, SAS Certifications Materials, SAS Certifications Tutorials, SAS Certifications Guide

The following SAS program is submitted:

proc sql;
select one.*, sales
from one right join two
on one.year = two.year;
quit;

Which one of the following reports is generated?

A. SAS Certifications Questions, SAS Certifications Materials, SAS Certifications Tutorials, SAS Certifications Guide

B. SAS Certifications Questions, SAS Certifications Materials, SAS Certifications Tutorials, SAS Certifications Guide

C. SAS Certifications Questions, SAS Certifications Materials, SAS Certifications Tutorials, SAS Certifications Guide

D. SAS Certifications Questions, SAS Certifications Materials, SAS Certifications Tutorials, SAS Certifications Guide

Answer: D

02. Given the following SAS data sets ONE and TWO: 

SAS Certifications Questions, SAS Certifications Materials, SAS Certifications Tutorials, SAS Certifications Guide

The following SAS program is submitted creating the output table THREE:

data three;
merge one (in = in1) two (in = in2);
by num;
run;

SAS Certifications Questions, SAS Certifications Materials, SAS Certifications Tutorials, SAS Certifications Guide

Which one of the following SQL programs creates an equivalent SAS data set THREE?

A. proc sql;
create table three as
select *
from one full join two
where one.num = two.num;
quit;

B. proc sql;
create table three as
select coalesce(one.num, two.num)
as NUM, char1, char2
from one full join two
where one.num = two.num;
quit;

C. proc sql;
create table three as
select one.num, char1, char2
from one full join two
on one.num = two.num;
quit;

D. proc sql;
create table three as
select coalesce(one.num, two.num)
as NUM, char1, char2
from one full join two
on one.num = two.num;
quit;

Answer: D

03. The following SAS program is submitted:

%let type = RANCH;
proc sql;
create view houses as
select *
from sasuser.houses
where style = “&type”;
quit;

%let type = CONDO;

proc print data = houses;
run;

The report that is produced displays observations whose value of STYLE are all equal to RANCH.

Which one of the following functions on the WHERE clause resolves the current value of the macro variable TYPE?

A. GET
B. SYMGET
C. %SYMGET
D. &RETRIEVE

Answer: B

04. The SAS data set SASDATA.SALES has a simple index on the variable DATE and a variable named REVENUE with no index.

In which one of the following SAS programs is the DATE index considered for use?

A. proc print data = sasdata.sales;
by date;
run;

B. proc print data = sasdata.sales;
where month(date) = 3;
run;

C. data march;
set sasdata.sales;
if ’01mar2002’d < date < ’31mar2002’d;
run;

D. data march;
set sasdata.sales;
where date < ’31mar2002’d or revenue > 50000;
run;

Answer: A

05. Given the following SQL procedure output:

Table Physical Obs % Deleted
EMPLOYEE_ADDRESSES 424  5.0%
EMPLOYEE_PAYROLL 424  5.0%

Which SQL query will produce a report for tables in the ORION library which have had at least 5% of their physical rows deleted, as shown above?

A. select MEMNAME ‘Table’, NOBS ‘Physical Obs’
, DELOBS/NOBS ‘% Deleted’ format=percent6.1
from dictionary.tables
where LIBNAME=’ORION’ AND DELOBS/NOBS >= .05;

B. select Table_Name, Num_Rows ‘Physical Obs’
, Deleted_Rows/Num_Rows ‘% Deleted’ format=percent6.1
from dictionary.DBA_TABLES
where TABLESPACE_NAME=’ORION’
AND Deleted_Rows/Num_Rows >= .05;

C. select MEMNAME ‘Table’, NLOBS ‘Physical Obs’
, DELOBS/NLOBS LABEL=’% Deleted’ format=percent6.1
from dictionary.tables
where LIBNAME=’ORION’ AND DELOBS/NLOBS >= .05;

D. select MEMNAME ‘Table’, NOBS ‘Physical Obs’
, DELOBS/NOBS LABEL=’% Deleted’ format=percent6.1
from dictionary.members
where LIBNAME=’ORION’ AND DELOBS/NOBS >= .05;

Answer: A

06. The following SAS program is submitted:
options __________;

%abc(work.look,Hello,There);In the text box above, complete the options statement that will produce the following log messages:

M*****(ABC): title1 “Hello” ;
M*****(ABC): title2 “There” ;
M*****(ABC): proc print data=work.look ;
M*****(ABC): run ;

Answer: mprint

07.  The following SAS program is submitted:

%macro mysum(n);
%if &n > 1 %then %eval(&n + %mysum(%eval(&n-1)));
%else &n;
%mend;

%put %mysum(4);

Which output is written to the log?
A. 10
B. 4+3+2+1
C. 7
D. A character operand was found in the %EVAL function or %IF condition where a numeric operand is required.

Answer: A

08. A local permanent data set has the following characteristics:

  • 80 character variables, length 200, storing 28 bytes of non-repeating characters
  • 120 numeric variables, length 8, 14 digits
  • 4000 observations

What is the best way to reduce the storage size of this data set?

A. Compress the data set with character compression
B. Reduce length of character variables to 28 bytes
C. Compress the data set with binary compression
D. Reduce length of character variables to 6 bytes

Answer: B

09. The following program is submitted to check the variables Xa, Xb, and Xc in the SASUSER.LOOK data set:

data _null_ WORK.BAD_DATA / view=WORK.BAD_DATA ;
set SASUSER.LOOK(keep=Xa Xb Xc);
length _Check_ $ 10 ;
if Xa=. then _check_=trim(_Check_)!!” Xa” ;
if Xb=. then _check_=trim(_Check_)!!” Xb” ;
if Xc=. then _check_=trim(_Check_)!!” Xc” ;
put Xa= Xb= Xc= _check_= ;
run ;

When is the PUT statement executed?

A. when the code is submitted
B. only when the WORK.BAD_DATA view is used
C. both when the code is submitted and the view is used
D. never, the use of _null_ in a view is a syntax error

Answer: B

10. Which clause in the following program is incorrect?

proc sql;
select sex,mean(weight) as avgweight
from company.employees company.health
where employees.id=health.id
group by sex;

A. SELECT
B. FROM
C. WHERE
D. GROUP BY

Answer: B

Real Time Advanced SAS Certification Questions and Online Practice Exams