Premium

SAS Base Latest Interview Preparation (Q&A)



Question-: What is the FIRST.variable and LAST.variable?

Answer: These are variables that SAS creates for each BY variable. SAS sets FIRST.variable when it is processing the first observation in a BY group, and sets LAST.variable when it is processing the last observation in a BY group. These assignments enable you to take different actions, based on whether processing is starting for a new BY group or ending for a BY group.


Question-: In which scenario you don’t have to preprocess the data if you are going to use the By-group processing?

Answer: Data does not require pre-processing if the observations in all of the data sets occur in one of the following patterns.

- ascending or descending numeric order
- ascending or descending character order
- not alphabetical or numerical order, but grouped in some way, such as by calendar month

If the observations are not in the order that you want, sort the data set before using BY-group processing.



Question-: Can you explain the BY statement, in the SET statement?

Answer: When you use the BY statement in the SET statement of the DATA it would do the following things
- The data sets listed in the SET statement must be indexed or sorted by the values of the BY variable or variables.
- The DATA step automatically creates two variables, FIRST. and LAST., for each variable in the BY statement.
- FIRST. and LAST. identify the first and last observation in each BY group, respectively.



Question-: What is the use of BY group statements?

Answer: If you use the BY Group statement then it would create a group for the variable specified in the BY group statement and keep all the data with same value in the same group.

Thanks for considering SAS A00-215 Certification Preparation Material from http://hadoopexam.com . You can get access to all the 150+ questions and answer for your real exam preparation from below link. Where you would find the same quality of questions and correct answers with the detailed explanation. Below are most popular SAS Certification preparation material and we are continuously updating and adding more questions.

Related Questions


Question-: Wrong data values are considered Syntax errors?

Question-: If there are 3 errors in your data steps, then what would be value of automatic variable _ERROR_?

Question-: What happens if SAS can not determine the syntax error?

Question-: What happens when SAS variable type is not defined correctly?

Question-: What is the FIRST.variable and LAST.variable?

Question-: In which scenario you don’t have to preprocess the data if you are going to use the By-group processing?

Question-: Can you explain the BY statement, in the SET statement?

Question-: What is the use of BY group statements?