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
what is metadata? : Sas-bi
What is your favorite all time computer book? Why?
how do the in= variables improve the capability of a merge? : Sas programming
what is the difference between nodup and nodupkey options? : Sas programming
What is PROC in SAS?
Which are the statements whose placement in the data step is critical?
explain the difference between alternate key, business key, foreign key, generated key, primary key, retained key and surrogate key ? : Sas-di
How do you connect the desktop application to metadata server? : sas-grid-administration
What are the best sas programming practices for handling very large datasets? : sas-grid-administration
Explain what is SAS informats?
it will become easy if uuu provide website linkssss and list of consultanciessssss
Assuming {et} is randomly drawn from N(0,1) and e0 = 0, generate 200 observations of xt = et − 0.5e(t−1) and draw a line graph of xt.
Explain how you can debug and test your SAS program?
which date functions advances a date time or date/time value by a given interval? : Sas programming
explain the main difference between the nodup and nodupkey options? : Sas-administrator