SAS Base Certification Practice – Question 1

Question 1: The following SAS program is submitted:
 

1
2
3
4
5
6
7
data test;
set sasuser.employees;
if 2 le years_service le 10 then amount = 1000;
else if years_service gt 10 then amount = 2000;
else amount = 0;
amount_per_year = years_service / amount;
run;

Which one of the following values does the variable AMOUNT_PER_YEAR contain if an employee has been with the company for one year?

Options:

A. 0
B. 1000
C. 2000
D. . (missing numeric value)

*This blog is not affiliated with SAS or the SAS Institute. All answer logs, data sets, output, and commentary are provided by this blog.

Correct Answer

Incorrect Answer

Click to see Answer Explanation below

thanks for your support

1 Comment

    Cole Oct 18, 2015

    Please note that this problem has a bit of a typo (no space after the set statement). A correction might make the question more clear. Thanks!

    Reply

Leave a Comment

Please keep in mind that comments are moderated and rel="nofollow" is in use. So, please do not use a spammy keyword or a domain as your name, or it will be deleted. Let us have a personal and meaningful conversation instead.