The following SAS program is submitted:
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?
A.0
B. 1000
C.2000
D.(missing numeric value)
Why the answer is C? I can not understand. Can any body explain to me why?
Thanks!
##########################
The following SAS program is submitted:
libname rawdate1 'location of SAS data library';
filename rawdata2 'location of raw data file';
data work.testdata;
infile;
input sales1 sales2;
run;
which one of the following is needed to complete the program correctly?
A. rawdata1
B. rawdata2
C. 'rawdata1'
D.'rawdata2'
I choose B. but the answer is D. Why?