Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...

What is _n_?

Answer Posted / ravi

This is nothing but a implict variable created by SAS during
data processing. It gives the total number of records SAS
has iterated in a dataset. It is Available only for data
step and not for procs.

Eg. If we want to find every third record in a Dataset then
we can use the _n_ as follows
Data new-sas-data-set;
Set old;
if mod(_n_,3)= 1 then;
run;
Note: If we use a where clause to subset the _n_ will not
yield the required result.

Is This Answer Correct ?    13 Yes 3 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

what is SAS OPTIMIZATION?

2297


How would you include common or reuse to be processed along with your statements?

2373


How to limit decimal places for the variable using proc means?

1068


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

1262


How does the internal authentication work in sas? : sas-grid-administration

1121


What are the ways in which macro variables can be created in sas programming?

1103


What are the special input delimiters used in SAS?

1183


What is the difference between INPUT and INFILE ?

1322


Mention sas system options to debug sas macros.

1177


If money were no object, what would you like to do?

3204


what is sas application server, database server, sas olap server and sas metadata server? : Sas-di

1015


Which command is used to save logs in the external file?

1099


for what purpose would you use the retain statement? : Sas programming

1096


What is SAS? What are the functions does it performs?

1197


Explain substr function?

1111