What is _n_?

Answer Posted / chandra sekar

_N_ gives the record number. You can access any record in
the dataset using _N_ if you know the record number. It is
set as 1 for the first record and incremented for every
subsequent record. It is an automatic variable and is not
visible when you open a dataset. This can also be used to
subset a data. For ex, if you want to access the first 100
records then you can say "if _N_ <= 100".

Is This Answer Correct ?    63 Yes 2 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is the difference between order and group variable in proc report?

825


Explain proc univariate?

597


Explain the difference between informat and format with an example.

674


what are the new features included in the new version of sas i.e., Sas 9.1.3? : Sas programming

538


explain the function of substr in sas? : Sas-administrator

546






What is the difference between where and if statement?

608


List down the reasons for choosing sas over other data analytics tools.

799


if a variable contain dates like "2015/01"---"2015/12" (yymm) ,How to add day to those dates,if them month is jan then 31 if the month is feb then 28 so on ...

932


what is ae onset date n what is RDS

1931


What is the role of unrestrictive users? : sas-grid-administration

567


Hello Friends, am new to this forum and am not good at sas progarmming. please can any one of you send me couple of sample large sample SAS Jobs which can you use 200 MB of data and other sas job upto 25GB of data. am doing a performance testing on our legacy systems and new upgraded system. I would really appreciate if you can do me this favor Thank you Priya

1337


what is sas database server? : Sas-di

605


explain the use of % includes a statement in sas? : Sas-administrator

542


what are 5 ways to perform a table lookup in sas? : Sas-administrator

753


What sas features do you use to check errors and data validation?

672