What is a method for assigning first.VAR and last.VAR to the BY group variable on unsorted data?



What is a method for assigning first.VAR and last.VAR to the BY group variable on unsorted data?..

Answer / Rahul Harshawardhan

To assign first.VAR and last.VAR to the BY group variable on unsorted data, you can use the FIRSTOBS and LASTOBS system options or the _N_ automatic variable. You may also consider sorting the data after reading it into SAS before performing the analysis.

Is This Answer Correct ?    0 Yes 0 No

Post New Answer

More SAS Interview Questions

How to get part of string form the source string without using sub string function in SAS?

3 Answers  


How to create a permanent sas data set?

1 Answers  


How does SAS handle missing values in: assignment statements, functions, a merge, an update, sort order, formats, PROCs?

1 Answers   Quintiles,


what are all the ways to define macro variable??

2 Answers   GSK GlaxoSmithKline,


what is the main difference between rename and label? (don't say that they both perform the same function).

11 Answers   Parexel,


Mention common programming errors committed in sas ?

1 Answers  


How do you use the do loop if you don’t know how many times you should execute the do loop?

1 Answers  


What is a method for assigning first.VAR and last.VAR to the BY group variable on unsorted data?

1 Answers   Quintiles,


how to do user inputs and command line arguments in sas?

1 Answers   D&B, TCS,


Describe the function and utility of the most difficult SAS macro that you have written?

1 Answers   Oracle,


How to read an input file in sas?

1 Answers  


explain what is data set in sas? : Sas-administrator

1 Answers  


Categories