Ensurepass

QUESTION 81

Given the following SAS data set ONE:

ONE

CATEGORY AGE SALARY BONUS

M 28 200 .

M 25 100 10

F 18 100 50

F 25 200 10

The following SAS program is submitted:

proc sql;

create table two as

select category, salary + bonus as EARNINGS

from one; quit;

Which one of the following represents the data values stored in the data set TWO?

 A. CATEGORY EARNINGS M 200 M 110 F 150 F 210 B. CATEGORY EARNINGS M . M 110 F 150         F 210 C. CATEGORY SALARY BONUS EARNINGS M 200 . 200 M 100 10 110 F 100 50 150 F 200 10 210 D. CATEGORY SALARY BONUS EARNINGS M 200 . . M 100 10 110 M 200 . 200 M 100 10 110 F 100 50 150 F 200 10 210

QUESTION 82

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?

 A. LEVEL AGE 2 20 3 20 B. LEVEL AGE 2 30 3 30 C. LEVEL MAX 2 20 3 30 D. LEVEL MAX 2 30 3 30

QUESTION 83

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?

 A. any integer between 1 and 10 B. any real number between 0 and 1 C. any integer between 1 and 2,500,000 D. any real number between 1 and 2,500,000

QUESTION 84

Given the following SAS data sets ONE and TWO:

ONE TWO

YEAR QTR BUDGET YEAR QTR SALES

2001 3 500 2001 4 300

2001 4 400 2002 1 600

2002 1 700

The following SAS program is submitted:

proc sql;

select one.*, sales

from one, two;

quit;

Which one of the following reports is generated?

 A. YEAR QTR BUDGET SALES         2001 4 400 300 2002 1 700 600 B. YEAR QTR BUDGET SALES 2001 3 500 . 2001 4 400 300 2002 1 700 600 C. YEAR QTR BUDGET SALES 2001 3 500 300 2001 4 400 300 2002 1 700 600 D. YEAR QTR BUDGET SALES 2001 3 500 300 2001 4 400 300 2002 1 700 300 2001 3 500 600 2001 4 400 600 2002 1 700 600

QUESTION 85

The following SAS program is submitted:

%macro execute;

<insert statement here>

proc print data = sasuser.houses;

run;

%end;

< span lang="EN-US" style="font-family: ; mso-font-kerning: 0pt; mso-no-proof: yes">

%mend;

Which of the following completes the above program so that it executes on Tuesday?

 A. %if &sysday = Tuesday %then %do; B. %if &sysday = ‘Tuesday’ %then %do; C. %if “&sysday” = Tuesday %then %do; D. %if ‘&sysday’ = ‘Tuesday’ %then %do;

QUESTION 86

Given the SAS data set ONE:

ONE

NUM VAR

1 A

2 B

3 C

Which SQL procedure program deletes the data set ONE?

 A. proc sql; Drop table one; Quit; B. proc sql; Remove table one; Quit; C. proc sql; Delete table one; Quit; D. proc sql; Delete from one; Quit;

QUESTION 87

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?

 A. 3 B. 4 C. 5 D. 6

QUESTION 88

Given the following SAS data set ONE:

ONE

COUNTRY CITY VISIT

USA BOSTON 10

UK LONDON 5

USA DALLAS 10

UK MARLOW 10

USA BOSTON 20

UK LONDON 15

USA DALLAS 10

The following SAS program is submitted:

proc sql;

select country, city, sum(visit) as TOTAL

from one

group by country, city

order by country, total desc;

quit;

Which one of the following reports is generated?

 A. COUNTRY CITY TOTAL UK MARLOW 10 UK LONDON 20 USA BOSTON 50 USA DALLAS 20 B. COUNTRY CITY TOTAL UK LONDON 20 UK MARLOW 10 USA BOSTON 50 USA DALLAS 20 C. COUNTRY CITY TOTAL USA BOSTON 50 D. COUNTRY CITY TOTAL UK MARLOW 10 UK LONDON 20 USA DALLAS 20 USA BOSTON 50

QUESTION 89

The following SAS program is submitted:

Data sasuser.history;

Set sasuser.history(keep=state x y

Rename = (state=ST));

Total=sum(x,y);

Run;

The SAS data set SASUSER.HISTORY has an index on the variable STATE.

Which describes the result of submitting the SAS program?

 A. The index on STATE is deleted and an index on ST is created B. The index on STATE is recreated as an index on ST C. The index on STATE is deleted D. The index on STATE is updated as an index on ST

QUESTION 90

Given has SAS dataset ONE:

The following SAS program is submitted:

Proc sql;

<insert SQL clause here>

from one;

quit;

The following output is desired:

Which SQL procedure clause completes the program and generates the desired output?

 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’