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

SAS Institute A00-211 Dumps

Page: 1 / 10
Total 270 questions

SAS Base Programming for SAS (r) 9 Questions and Answers

Question 1

The following SAS program is submitted:

data work.accounting;

set work.department;

length jobcode $ 12;

jobcode=’FAl’;

run;

The WORK.DEPARTMENT data set contains a character variable named JOBCODE with a length of 5. What is the result?

Options:

A.

The length of the variable JOBCODE is 3.

B.

The length of the variable JOBCODE is 5.

C.

The length of the variable JOSBODE is 12.

D.

The program fails to execute due to errors.

Question 2

Which statement describes a characteristic of the SAS automatic variable _ERROR_?

Options:

A.

The _ERROR_ variable maintains a count of the number of data errors in a DATA step.

B.

The _ERROR_ variable is added to the program data vector and becomes part of the data set being created.

C.

The _ERROR_ variable can be used in expressions in the DATA step.

D.

The _ERROR_ variable contains the number of the observation that caused the data error.

Question 3

The SAS data set PETS is sorted by the variables TYPE and BREED.

The following SAS program is submitted:

proc print data = pets;

var type breed;

sum number;

run;

What is the result?

Options:

A.

The SUM statement produces only a grand total of NUMBER.

B.

The SUM statement produces only subtotals of NUMBER for each value of TYPE.

C.

The SUM statement produces both a grand total of NUMBER and subtotals of NUMBER for each value of TYPE.

D.

Nothing is produced by the SUM statement; the program fails to execute.

Question 4

Given the SAS data set WORKAWARDS:

WORK.AWARDS

FNAMEPOINTSMONTH

----------------------------------

Amy24

Amy17

Gerard33

Wang33

Wang112

Wang18

The following SAS program is submitted:

proc sort data = work.awards;

by descending fname points;

run;

How are the observations sorted?

Options:

A.

ENAME POINTS MONTHWang33Wang112Wang18Gerard33Amy24Amy17

B.

ENAME POINTS MONTHAmy24Amy17Gerard33Wang33Wang18Wang112

C.

ENAME POINTS MONTH Wang33Wang18Wang112Gerard33Amy24Amy17

D.

ENAME POINTS MONTHWang112Wang18Wang33Gerard33Amy17Amy24

Question 5

Given the SAS data set PRICES:

PRICES

Prodid priceproducttypesalesreturns

K1255.10NETWORK152

B132S 2.34HARDWARE30010

R18KY2 1.29SOFTWARE255

3KL8BY 6.37HARDWARE12515

DY65DW 5.60HARDWARE455

DGTY23 4.55HARDWARE672

The following SAS program is submitted:

data hware inter cheap;

set prices(keep = productype price);

if producttype = ‘HARDWARE’ then output hware; else if producttype = ‘NETWORK’ then output

inter; if price le 5.00;

run;

if producttype = ‘HARDWARE’ then output hware; else if producttype = ‘NETWORK’ then output

inter; if price le 5.00;

run;

How many observations does the HWARE data set contain?

Options:

A.

0

B.

2

C.

3

D.

4

Question 6

Given the SAS data set WORK.TEMPS:

The following program is submitted:

Which output is correct?

Options:

A.

Option A

B.

Option B

C.

Option C

D.

Option D

Question 7

Which is a valid LIBNAME statement?

Options:

A.

libname "_SAS_data_library_location_";

B.

sasdata libname "_SAS_data_library_location_";

C.

libname sasdata "_SAS_data_library_location_";

D.

libname sasdata sas "_SAS_data_library_location_";

Question 8

Read the table

The following SAS program is submitted:

proc freq data = sales;

run;

The following output is created by the FREQUENCY procedure:

Which TABLES statement(s) completed the program and produced the output?

Options:

A.

tables region product;

B.

tables region * product;

C.

tables product * region;

D.

tables product; tables region;

Question 9

Given the AIRPLANES data set

AlRPLANES

TYPE MPG

-------- ------

F-18 105

C-130 25

Harrier 75

A-6 110

The following SAS program is submitted:

data gt100;

set airplanes(keep = type mpg load);

load = mpg * 150;

run;

The program fails to execute due to syntax errors.

What is the cause of the syntax error?

Options:

A.

MPG is not a numeric variable.

B.

LOAD is not a variable in the data set GT100.

C.

LOAD is not variable in the data set AIRPLANES.

D.

LOAD must be defined prior to the SET statement.

Question 10

The following SAS program is submitted:

data work.empsalary;

set work.people (in = inemp)

work.money (in = insal);

if insal and inemp;

run;

The SAS data set WORKPEOPLE has 5 observations, and the data set WORKMONEY has 7 observations. How many observations will the data set WORK.EMPSALARY contain?

Options:

A.

0

B.

5

C.

7

D.

12

Question 11

The following SAS program is submitted:

Data_null_;

set old;

put sales 1 sales2;

run;

Where is the output written?

Options:

A.

to the SAS log

B.

to the SAS data set _NULL_

C.

to the SAS output window or to an output file

D.

to the raw data file that was most recently opened

Question 12

The following SAS program is submitted:

data work.sets;

do until (prod gt 6);

prod + 1;

end;

run;

What is the value of the variable PROD in the output data set?

Options:

A.

6

B.

7

C.

8

D.

(missing numeric)

Question 13

After a SAS program is submitted, the following is written to the SAS log:

105 data january;

106 set allmonths(keep = product month num_sold cost);

107 if month = ‘Jan’ then output january;

108 sales = cost * num_sold;

109 keep = product sales;

------

22

ERROR 22-322: Syntax error, expecting one of the following:!,

!!, &, *,**, +, -,/, <,< =, <>, =, >, ><, >=,

AND, EQ, GE, GT, IN, LE, LT, MAX, MIN, NE, NG, NL,

NOTIN, OR,^=,|,II,

110 run;

What changes should be made to the KEEP statement to correct the errors in the LOG?

Options:

A.

keep product sales;

B.

keep product, sales;

C.

keep = product, sales;

D.

keep = (product sales);

Question 14

Given the SAS data set WORK.EMP_NAME:

Given the SAS data set WORK.EMP_DEPT:

The following program is submitted:

How many observations are in data set WORK.ALL after submitting the program?

Options:

A.

1

B.

2

C.

3

D.

5

Question 15

The following SAS program is submitted, creating the SAS data set ONE:

data one;

infile ‘file specification’;

input num chars$;

run;

ONE

NUMCHAR

----------------

123

323

177

The following SAS program is submitted:

proc print data = one;

where char = 23;

run;

What is output?

Options:

A.

NUM CHAR1 772

B.

NUM CHAR1 233 23

C.

NUM CHAR1 233 231 77

D.

No output is generated.

Question 16

The following SAS program is submitted:

proc sort data = work.employee;

by descending fname;

proc sort data = work.salary;

by descending fname;

data work.empdata;

merge work.employee

work.salary;

by fname;

run;

Why does the program rail to execute?

Options:

A.

The SORT procedures contain invalid syntax.

B.

The merged data sets are not permanent SAS data sets.

C.

The RUN statement was omitted alter each or the SORT procedures.

D.

The data sets were not merged in the order by which they were sorted.

Question 17

The following SAS program is submitted:

How many observations are written to the WORK.SALES data set?

Options:

A.

0

B.

1

C.

5

D.

60

Question 18

A user-defined format has been created using the FORMAT procedure. Where is it stored?

Options:

A.

in a SAS catalog

B.

in an external binary file

C.

in a SAS dataset in the WORK library

D.

in a SAS dataset in a permanent SAS data library

Question 19

Given the raw data record DEPT:

----|----10---|----20---|----30

Printing 750

The following SAS program is submitted:

data bonus;

infile ‘dept’;

inputdept$ 1-11 number 13- 15;

run;

Which SAS statement completes the program and results in a value of ‘Printing750’ for the DEPARTMENT variable?

Options:

A.

department = dept II number;

B.

department = left(dept) II number;

C.

department = trim(dept) number;

D.

department=trim(dept)||put(number,3.);

Question 20

The following SAS program is submitted:

<_insert_ods_code_>

proc means data=SASUSER.SHOES;

where Product in ('Sandal' , 'Slipper' , 'Boot');

run;

<_insert_ods_code_>

Which ODS statements inserted, respectively, in the two location above creates a report stored in an html file?

Options:

A.

ods html open='sales.html';ods html close;

B.

ods file='sales.html' / html;ods file close;

C.

ods html file='sales.html';ods html close;

D.

ods file html='sales.html';ods file close;

Question 21

Given the contents of the raw data file 'EMPLOYEE.TXT'

Which SAS informat correctly completes the program?

Options:

A.

date9

B.

mmddyy10

C.

ddmmyy10

D.

mondayyr10

Question 22

Given the SAS data set WORK.ONE:

The following SAS program is submitted:

The data set WORK.TWO is created, where Day would be 1 for Sunday, 2 for Monday, 3 for Tuesday, ... :

Which expression successfully completed the program and creates the variable DAY?

Options:

A.

day(BeginDate)

B.

weekday(BeginDate)

C.

dayofweek(BeginDate)

D.

getday(BeginDate,today())

Question 23

The following SAS program is submitted:

data work.pieces;

do while (n lt 6);

n + 1;

end;

run;

Which one of the following is the value of the variable N in the output data set?

Options:

A.

4

B.

5

C.

6

D.

7

Question 24

The SAS data set Fed.Banks contains a variable Open_Date which has been assigned a permanent label of "Open Date". Which SAS program temporarily replaces the label "Open Date" with the label "Starting Date" in the output?

Options:

A.

proc print data=SASUSER.HOUSES label;label Open_Date "Starting Date";run;

B.

proc print data=SASUSER.HOUSES label;label Open_Date="Starting Date";run;

C.

proc print data=SASUSER.HOUSES;label Open_Date="Starting Date";run;

D.

proc print data=SASUSER.HOUSES;Open_Date="Starting Date";run;

Question 25

Given the raw data file ‘DEPENDENTS.TXT’:

The following SAS program is submitted:

What will be the value of _ERROR_ in the Program Data Vector for each iteration of the DATA step?

Options:

A.

B.

C.

D.

Question 26

The following SAS program is submitted:

The SAS data set WORK.SALARY is currently ordered by Gender within Department. Which inserted code will accumulate subtotals for each Gender within Department?

Options:

A.

Gender

B.

Department

C.

Gender Department

D.

Department Gender

Question 27

Given the following raw data records:

The following output is desired:

Which SAS program correctly reads in the raw data?

Options:

A.

Option A

B.

Option B

C.

Option C

D.

Option D

Question 28

The following SAS program is submitted:

data work.totalsales;

set work.monthlysales(keep = year product sales);

retain monthsales {12} ;

array monthsales {12} ;

do i = 1 to 12;

monthsales{i} = sales;

end;

cnt + 1;

monthsales{cnt} = sales;

run;

The data set named WORK.MONTHLYSALES has one observation per month for each of five years for a total of 60 observations.

Which one of the following is the result of the above program?

Options:

A.

The program fails execution due to data errors.

B.

The program fails execution due to syntax errors.

C.

The program runs with warnings and creates the WORK.TOTALSALES data set with 60 observations.

D.

The program runs without errors or warnings and creates the WORK.TOTALSALES data set with 60 observations

Question 29

This question will ask you to provide a segment of missing code.

Given the SAS data set WORK.ONE:

The following SAS program is submitted:

The data set WORK.TWO is created, where Day would be the day of the month:

Which expression successfully completed the program and creates the variable Day?

Options:

A.

day(BeginDate)

B.

weekday(BeginDate)

C.

dayofmonth(BeginDate)

D.

getday(BeginDate)

Question 30

The following SAS program is submitted:

data WORK.OUTDS;

do until(Prod GT 6);

Prod + 1;

end;

run;

What is the value of the variable Prod in the output data set?

Options:

A.

(missing)

B.

6

C.

7

D.

Undetermined, infinite loop.

Question 31

After a SAS program is submitted, the following is written to the SAS log:

What issue generated the error in the log?

Options:

A.

There should have been commas between the variable names.

B.

The list of variables should have been enclosed in parentheses.

C.

A drop statement and a keep= data set option cannot both be used at the same time.

D.

The syntax of the drop statement does not use an equals sign.

Question 32

The SAS data set named WORK.SALARY contains 10 observations for each department, and is currently ordered by Department.

The following SAS program is submitted:

What is the value of the variable Total before the first iteration of the data step?

Options:

A.

The value of the first observation’s Wagerate.

B.

0

C.

Missing

D.

Cannot be determined from the information given

Question 33

The following SAS program is submitted:

data WORK.ACCOUNTING;

set WORK.DEPARTMENT;

length EmpId $6;

CharEmpid=EmpId;

run;

If data set WORK.DEPARTMENT has a numeric variable EmpId. Which statement is true about the output dataset?

Options:

A.

The type of the variable CharEmpid is numeric.

B.

The type of the variable CharEmpid is unknown.

C.

The type of the variable CharEmpid is character.

D.

The program fails to execute due to errors.

Question 34

The following SAS program is submitted:

data work.totalsales (keep = monthsales{12} );

set work.monthlysales (keep = year product sales);

array monthsales {12} ;

do i=1 to 12;

monthsales{i} = sales;

end;

run;

The data set named WORK.MONTHLYSALES has one observation per month for each of five years for a total of 60 observations.

Which one of the following is the result of the above program?

Options:

A.

The program fails execution due to data errors.

B.

The program fails execution due to syntax errors.

C.

The program executes with warnings and creates the WORK.TOTALSALES data set.

D.

The program executes without errors or warnings and creates the WORK.TOTALSALES data set

Question 35

A raw data file is listed below:

RANCH,1250,2,1,Sheppard Avenue,"$64,000"

SPLIT,1190,1,1,Rand Street,"$65,850"

CONDO,1400,2,1.5,Market Street,"80,050"

TWOSTORY,1810,4,3,Garris Street,"$107,250"

RANCH,1500,3,3,Kemble Avenue,"$86,650"

SPLIT,1615,4,3,West Drive,"94,450"

SPLIT,1305,3,1.5,Graham Avenue,"$73,650"

The following SAS program is submitted using the raw data file as input:

data work.condo_ranch;

infile 'file-specification' dsd;

input style $ @;

if style = 'CONDO' or style = 'RANCH';

input sqfeet bedrooms baths street $ price : dollar10.;

run;

How many observations will the output data set contain?

Options:

A.

0

B.

3

C.

5

D.

7

Question 36

Which of the following programs correctly invokes the DATA Step Debugger?

Options:

A.

Option A

B.

Option B

C.

Option C

D.

Option D

Question 37

The following SAS program is submitted:

data work.test;

array agents{4} $ 12 sales1 - sales4;

run;

Which one of the following represents the variables that are contained in the output data set?

Options:

A.

SALES1, SALES2, SALES3, SALES4

B.

AGENTS1, AGENTS2, AGENTS3, AGENTS4

C.

None, the DATA step fails because the ARRAY statement can reference only numeric data.

D.

None, the DATA step fails because the ARRAY statement can reference only pre-existing variables.

Question 38

Given the following raw data records:

The following output data set is desired:

Which SAS program correctly reads in the raw data?

Options:

A.

B.

C.

D.

Question 39

The following SAS program is submitted:

libname temp 'SAS-data-library';

data work.new;

set temp.jobs;

format newdate mmddyy10.;

qdate = qtr(newdate);

ddate = weekday(newdate);

run;

proc print data = work.new;

run;

The variable NEWDATE contains the SAS date value for April 15, 2000.

What output is produced if April 15, 2000 falls on a Saturday?

Options:

A.

Obs newdate qdate ddate1 APR152000 2 6

B.

Obs newdate qdate ddate1 04/15/2000 2 6

C.

Obs newdate qdate ddate1 APR152000 2 7

D.

Obs newdate qdate ddate1 04/15/2000 2 7

Question 40

The following SAS program is submitted:

What will the data set WORK.TEST contain?

Options:

A.

Option A

B.

Option B

C.

Option C

D.

Option D

Page: 1 / 10
Total 270 questions