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:

Haha, this is an easy one. If you can't figure out that C is the right answer, you might want to rethink your career choice!
upvoted 0 times
...
Goldie
9 days ago
This question is pretty straightforward. The BY statement is clearly creating new variables with the names First_State and Last_State.
upvoted 0 times
...
Daron
15 days ago
I think the answer is D) First. and Last. because those are the variables created by the BY statement
upvoted 0 times
...
Dante
17 days ago
I agree with Vivienne. The code shows that the variables created are First_State and Last_State, not the options in A, B, or D.
upvoted 0 times
...
Clorinda
22 days ago
But the BY statement creates variables for the first and last observations in a BY group, so A) makes more sense
upvoted 0 times
...
Annette
1 months ago
I disagree, I believe the answer is B) First. State and Last. State
upvoted 0 times
...
Clorinda
1 months ago
I think the answer is A) State. First and State. Last
upvoted 0 times
...
Vivienne
1 months 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
Chantell
13 days ago
You are right, the BY statement creates new variables with the prefix of the variable names.
upvoted 0 times
...
Socorro
16 days ago
No, I believe it is C) First_State and Last_State
upvoted 0 times
...
Carri
1 months ago
I think the correct answer is A) State. First and State. Last
upvoted 0 times
...
...

Save Cancel
az-700  pass4success  az-104  200-301  200-201  cissp  350-401  350-201  350-501  350-601  350-801  350-901  az-720  az-305  pl-300  

Warning: Cannot modify header information - headers already sent by (output started at /pass.php:70) in /pass.php on line 77