This entry was posted on Jan 31 2008 by admin

SAS-a00-201 Demo

SAS-a00-201 Demo

3.The following SAS program is submitted:

data work.total;

? ? ? ? set work.salary(keep = department wagerate);

? ? ? ? by department;

? ? ? ? if first.department then payroll = 0;

? ? ? ? payroll + wagerate;

? ? ? ? if last.department;

run;

 

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

 

Which one of the following is true regarding the program above?

 

A: The BY statement in the DATA step causes a syntax error.

B: FIRST.DEPARTMENT and LAST.DEPARTMENT are variables in the WORK.TOTAL data set.

C: The values of the variable PAYROLL represent the total for each department in the WORK.SALARY data set.

D: The values of the variable PAYROLL represent a total for all values of WAGERATE in the WORK.SALARY data set.

Correct Answers:? C

 

4.The following SAS program is submitted:

 

data work.test;

? ? ? set work.staff (keep = jansales febsales marsales);

? ? ? array diff_sales{3} difsales1 – difsales3;

? ? ? array monthly{3} jansales febsales marsales;

run;

 

Which one of the following represents the new variables that are created?

 

A: JANSALES, FEBSALES and MARSALES

B: MONTHLY1, MONTHLY2 and MONTHLY3

C: DIFSALES1, DIFSALES2 and DIFSALES3

D: DIFF_SALES1, DIFF_SALES2 and DIFF_SALES3

Correct Answers:? C

 

5.The following SAS program is submitted:

 

data work.passengers;

? ? ? ? ? if OrigPassengers = . then

? ? ? ? ? ? ? ? OrigPassengers = 100;

? ? ? ? ? TransPassengers = 100;

? ? ? ? ? OrigPassengers = .;

? ? ? ? ? NonPaying = 10;

? ? ? ? ? TotalPassengers = sum (OrigPassengers, TransPassengers);

run;

 

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

 

A: 100

B: 110

C: 200

D: . (missing numeric value)

Correct Answers:? A

 

6.The contents of the raw data file AMOUNT are listed below:

 

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

$1,234

 

The following SAS program is submitted:

 

data test;

? ? ? ? ? infile ‘amount’;

? ? ? ? ? input @1 salary 6.;

run;

 

Which one of the following is the value of the SALARY variable?

 

A: 1234

B: 1,234

C: $1,234

D: . (missing numeric value)

Correct Answers:? D

 

 

8.The contents of the raw data file NAMENUM are listed below:

 

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

? Joe xx

 

The following SAS program is submitted:

 

data test;

? ? ? ? ? infile ‘namenum’;

? ? ? ? ? input name $ number;

run;

 

Which one of the following is the value of the NUMBER variable?

 

A: xx

B: Joe

C: . (missing numeric value)

D: The value can not be determined as the program fails to execute due to errors.

Correct Answers:? C

 

9.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’ then

? ? ? ? ? ? ? input sqfeet bedrooms baths street $ price : dollar10.;

run;

 

How many observations does the WORK.CONDO_RANCH data set contain?

 

A: 0

B: 3

C: 5

D: 7

Correct Answers:? D

Uncategorized

Post a Comment