Pre-Summer Special - Limited Time 65% Discount Offer - Ends in 0d 00h 00m 00s - Coupon code: top65certs

Free and Premium SAS Institute A00-212 Dumps Questions Answers

Page: 1 / 7
Total 184 questions

SAS Advanced Programming Questions and Answers

Question 1

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?

Options:

A.

CONDO RANCH SPLIT TWOSTORY

B.

RANCH SPLIT CONDO TWOSTORY

C.

CONDO RANCH RANCH SPLIT SPLIT SPLIT TWOSTORY

D.

RANCH SPLIT CONDO TWOSTORY RANCH SPLIT SPLIT

Buy Now
Question 2

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?

Options:

A.

1900

B.

1920

C.

1950

D.

2000

Question 3

Given the data set shown on the left, the SAS program on the right is submitted:

Which statement is true regarding the WORK.MISSING data set?

Options:

A.

The descriptor portion of WORK.MISSING is created when the DATA step is submitted

B.

The data set is created when the DATA step is submitted

C.

When the view ONE is used in another SAS step, the data set is created

D.

The data set not created because the DATA statement contains a syntax error

Question 4

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?

Options:

A.

Select salary, salary*.10 var=BONUS

B.

Select salary, salary*.10 label='BONUS'

C.

Select salary, salary *.10 column='BONUS'

D.

Select salary, salary*.10 name='BONUS'

Question 5

A data set stored on a network drive has the following characteristics:

  • 14 Million observations
  • 400 numeric variables
  • 0 character variables of length 20
  • Binary compression

A DATA Step query requires only 3 character and 15 numeric variables from this data set. What is the best way to reduce computer resource utilization in this DATA Step?

Options:

A.

A KEEP= data set option used on the SET Statement

B.

A KEEP Statement used within the DATA Step

C.

A KEEP= data set option used on the DATA Statement

D.

A DROP= data set option used on the DATA Statement

Question 6

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?

Options:

A.

default

B.

keyword

C.

positional

D.

command

Question 7

Which one of the following techniques concatenates data in SAS?

Options:

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

Question 8

Which one of the following SAS procedures changes a permanent format of a variable stored in a SAS data set?

Options:

A.

MODIFY

B.

FORMAT

C.

CONTENTS

D.

DATASETS

Question 9

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?

Options:

A.

A report is generated with one destination.

B.

No report is generated as the case of the compared values is different.

C.

No report is generated as the case of the macro variable name is different.

D.

A report is generated with the two original observations as the where clause does not work.

Question 10

Assume today is Tuesday, July 23, 2002. Which one of the following statements submitted at the beginning of a SAS session assigns the value Tuesday, July 23, 2002 to the macro variable START?

Options:

A.

%let start = today(),weekdate.;

B.

%let start = today(),format=weekdate.;

C.

%let start = %sysfunc(today(),weekdate.);

D.

%let start = %sysfunc(%today(),weekdate.);

Question 11

CORRECT TEXT

The following SAS program is submitted:

%macro check(num=4);

%let result=%sysevalf(&num+0.5);

%put result is &result;

%mend;

%check(num=10)

What is the written to the SAS log?

Options:

Question 12

The SAS set WORK CHECK has an index on the variable Code and the following SAS program is submitted.

proc sort data=WORK.CHECK;

by Code;

run;

What describes the result of submitting SAS program?

Options:

A.

The index on Code is updates

B.

The sort does not execute

C.

The index on Code is deleted

D.

The index on the Code unaffected

Question 13

The following SAS program is submitted:

%let test=one;

%let one=two;

%let two=three;

%let three=last;

%put what displays is &&&&&test;

What is the written to the SAS log?

Options:

A.

What displays is three

B.

What displays is two

C.

What displays is one

D.

What displays is last

Question 14

The following SAS program is submitted:

data new(bufsize = 6144 bufno = 4);

set old;

run;

What is the difference between the usage of BUFFSIZE= and BUFNO= options?

Options:

A.

BUFSIZE=specifies the size of the output buffer in kilobytes; BUFNO=specifies the number of output buffers

B.

BUFSIZE= specifies the size of the input buffer in bytes; BUFFNO= specifies the number of input buffers

C.

BUFSIZE= specifies the size of the input buffer in kilobytes; BUFNO=specifies the number of input buffers

D.

BUFSIZE= specifies the size of the output buffer in bytes; BUFNO= specifies the number of output buffers

Question 15

Given the following SAS data set ONE:

ONE

CATEGORY AGE SALARY BONUS

M 28 200 20

M 25 100 10

M 28 300 10

M 33 300 30

F 18 100 50

F 25 200 10

F 35 400 50

The following SQL program is submitted:

proc sql;

create table two as

select distinct age

from one

where age < 33;

quit;

How many rows are written to the SAS data set TWO?

Options:

A.

3

B.

4

C.

5

D.

6

Question 16

Given the SAS data sets:

A SAS program is submitted and the following is written to SAS to:

What would allow the program to successfully execute without errors?

Options:

A.

Qualify the column names with the table names.

B.

Replace the 104 with:

Where EMPLOYEE.Name = Any (Select names separated with ‘,’

From WORK.NEWEMPLOYEE

Where Salary > 40000);

C.

Replace the where clause with:

Where EMPLOYEE.Name = (Select Names delimited with ‘,’

From WORK.NEWEMPLOYEE

Where Salary > 40000);

D.

Replace the equal sign with In operator.

Question 17

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?

Options:

A.

order by 1, 3

B.

order by 1, 3 desc

C.

orderby product, revenue desc

D.

order by product, desc revenue

Question 18

In which one of the following SAS programs is the SAS data set index named CHAR1 always used?

Options:

A.

data three;

set one;

set two key = char1;

run;

B.

data three;

set one;

if char1 in ('new york' 'los angeles');

run;

C.

data three;

set one;

where char1 in ('new york' 'los angeles');

run;

D.

proc sql;

create table three as

select *

from one, two

where one.char1 > two.char1;

quit;

Question 19

Which one of the following statements is true?

Options:

A.

The WHERE statement can be executed conditionally as part of an IF statement.

B.

The WHERE statement selects observations before they are brought into the PDV.

C.

The subsetting IF statement works on observations before they are read into the PDV.

D.

The WHERE and subsetting IF statements can be used interchangeably in all SAS programs.

Question 20

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?

Options:

A.

a is &a

B.

a is cat

C.

a is pig

D.

a is bird

Question 21

Which one of the following is true regarding the KEEP statement?

Options:

A.

The KEEP statement is available in both the DATA and the PROC steps.

B.

The KEEP statement selects the variables read from the input data set(s).

C.

The KEEP statement applies to all data sets created within the same DATA step.

D.

The KEEP statement applies only to the first data set created within the same DATA step if more than one data set is created.

Question 22

Consider the following SAS log:

229 data sasuser.ranch sasuser.condo / view = sasuser.ranch;

230 set sasuser.houses;

231 if style = 'RANCH' then output sasuser.ranch;

232 else if style = 'CONDO' then output sasuser.condo;

233 run;

NOTE: DATA STEP view saved on file SASUSER.RANCH.

NOTE: A stored DATA STEP view cannot run under a different operating system.

234

235 proc print data = sasuser.condo;

ERROR: File SASUSER.CONDO.DATA does not exist.

236 run;

NOTE: The SAS System stopped processing this step because of errors.

Which one of the following explains why the PRINT procedure fails?

Options:

A.

SASUSER.CONDO is a stored DATA step program.

B.

A SAS data file and SAS data view cannot be created in the same DATA step.

C.

A second VIEW=SASUSER.CONDO option was omitted on the DATA statement.

D.

The view SASUSER.RANCH must be processed before SASUSER.CONDO is created.

Question 23

Given the following SAS data set ONE:

ONE

GROUP SUM

A 765

B 123

C 564

The following SAS program is submitted:

data _null_;

set one;

call symput(group,sum);

run;

Which one of the following is the result when the program finishes execution?

Options:

A.

Macro variable C has a value of 564.

B.

Macro variable C has a value of 1452.

C.

Macro variable GROUP has a value of 564.

D.

Macro variable GROUP has a value of 1452.

Question 24

Given the SAS data set WORK.ONE:

The following SAS program is submitted;

Which result set would be generated?

Options:

A.

Option A

B.

Option B

C.

Option C

D.

Option D

Question 25

Which SET statements option names a variable that contains the number of the observation to read during the current iteration of the DATA step?

Options:

A.

OBS=pointobs

B.

POINT=pointobs

C.

KEY=pointobs

D.

NOBS=pointobs

Question 26

Which one of the following is the purpose of the IDXNAME= data set option?

Options:

A.

It instructs SAS to name and store a specific index.

B.

It instructs SAS to store an index in a particular location.

C.

It instructs SAS to use a specific index for WHERE processing.

D.

It instructs SAS to use any available index for WHERE processing.

Question 27

The following SAS program is submitted:

proc contents data = testdata.one;

run;

Which one of the following SQL statements produces similar information about the column attributes as the above CONTENTS procedure?

Options:

A.

proc sql;

show testdata.one;

quit;

B.

proc sql;

describe testdata.one;

quit;

C.

proc sql;

show table testdata.one;

quit;

D.

proc sql;

describe table testdata.one;

quit;

Page: 1 / 7
Total 184 questions