Deal of The Day! Hurry Up, Grab the Special Discount - Save 25% - Ends In 00:00:00 Coupon code: SAVE25
Welcome to Pass4Success

- Free Preparation Discussions

SAS Exam A00-215 Topic 13 Question 44 Discussion

Actual exam question for SAS's A00-215 exam
Question #: 44
Topic #: 13
[All A00-215 Questions]

Given the following code:

Which variables are created with the BY statement?

Show Suggested Answer Hide Answer
Suggested Answer: A

In SAS, when you use a BY statement in a DATA step, SAS creates two temporary variables for each variable listed in the BY statement: one to indicate the first occurrence (FIRST.variable) and another to indicate the last occurrence (LAST.variable) of the value within the BY-group. Given the provided code and assuming that State is the variable used in the BY statement, SAS will create First.State and Last.State. Thus, option A is correct.


SAS documentation on the BY statement, SAS Institute.

Contribute your Thoughts:

Annette
4 days ago
I disagree, I believe the answer is B) First. State and Last. State
upvoted 0 times
...
Clorinda
5 days ago
I think the answer is A) State. First and State. Last
upvoted 0 times
...
Vivienne
12 days ago
The correct answer is C) First_State and Last_State. The BY statement creates new variables with the prefix of the variable names.
upvoted 0 times
Carri
4 days ago
I think the correct answer is A) State. First and State. Last
upvoted 0 times
...
...

Save Cancel