Easter Sale 70% Discount Offer - Ends in 0d 00h 00m 00s - Coupon code: save70

Pearson A00-212 New Attempt

Page: 5 / 7
Total 184 questions

SAS Advanced Programming Questions and Answers

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

Page: 5 / 7
Total 184 questions