SAS EXAM CHAPTER 9 QUESTIONS
WITH 100% CORRECT ANSWERS
LATEST VERSION 2025/2026.
Which of the following statements will create the numeric variable Bonus with a value of 500?
work.comp
Bonus Compensation Bonus Month
500 108755 6
500 88475 1
500 27100 1
a. Bonus=$500;
b. Bonus=500;
c. label Bonus='500';
d. format Bonus 500.; - ANS B
You use an assignment statement to set the value of the variable Bonus equal to 500. Numeric
constants do not include commas or currency symbols.
Which of these statements specifies SAS functions correctly? Select all that apply.
1 @COPYRIGHT 2025/2026 ALLRIGHTS RESERVED.
, a. Deadline=sum(TimeSpent,Last_Name);
b. FingersToes=sum(10,10);
c. Birthday=mdy(8,27,90);
d. Review_Quarter=qtr(Hire_Date+372);
e. GreatDay=today();
f. BirthdayYear=year(Birth_Date);
g. BirthdayYear=year('12dec1987'd); - ANS b, c, d, e, f, and g. Except for the TODAY()
function, these numeric functions must specify appropriate numeric arguments in parentheses
following the function keyword. You can specify numeric constants, including SAS date
constants, numeric variables, or arithmetic expressions, as numeric arguments. The TODAY()
function doesn't require an argument.
A DROP statement has been added to this DATA step. Will the program calculate Compensation
and BonusMonth correctly?
data work.comp;
set orion.sales;
drop Gender Salary Job_Title Country
Birth_Date Hire_Date;
Bonus=500;
Compensation=sum(Salary,Bonus);
BonusMonth=month(Hire_Date);
run; - ANS Yes
The DROP statement is a compile-time-only statement. SAS sets a drop flag for the dropped
variables, but the variables are in the PDV and, therefore, are available for processing.
Which of the following can determine the length of a new variable?
2 @COPYRIGHT 2025/2026 ALLRIGHTS RESERVED.
WITH 100% CORRECT ANSWERS
LATEST VERSION 2025/2026.
Which of the following statements will create the numeric variable Bonus with a value of 500?
work.comp
Bonus Compensation Bonus Month
500 108755 6
500 88475 1
500 27100 1
a. Bonus=$500;
b. Bonus=500;
c. label Bonus='500';
d. format Bonus 500.; - ANS B
You use an assignment statement to set the value of the variable Bonus equal to 500. Numeric
constants do not include commas or currency symbols.
Which of these statements specifies SAS functions correctly? Select all that apply.
1 @COPYRIGHT 2025/2026 ALLRIGHTS RESERVED.
, a. Deadline=sum(TimeSpent,Last_Name);
b. FingersToes=sum(10,10);
c. Birthday=mdy(8,27,90);
d. Review_Quarter=qtr(Hire_Date+372);
e. GreatDay=today();
f. BirthdayYear=year(Birth_Date);
g. BirthdayYear=year('12dec1987'd); - ANS b, c, d, e, f, and g. Except for the TODAY()
function, these numeric functions must specify appropriate numeric arguments in parentheses
following the function keyword. You can specify numeric constants, including SAS date
constants, numeric variables, or arithmetic expressions, as numeric arguments. The TODAY()
function doesn't require an argument.
A DROP statement has been added to this DATA step. Will the program calculate Compensation
and BonusMonth correctly?
data work.comp;
set orion.sales;
drop Gender Salary Job_Title Country
Birth_Date Hire_Date;
Bonus=500;
Compensation=sum(Salary,Bonus);
BonusMonth=month(Hire_Date);
run; - ANS Yes
The DROP statement is a compile-time-only statement. SAS sets a drop flag for the dropped
variables, but the variables are in the PDV and, therefore, are available for processing.
Which of the following can determine the length of a new variable?
2 @COPYRIGHT 2025/2026 ALLRIGHTS RESERVED.