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
Difference between SAS STATA & SPSS?
Explain why double trailing @@ is used in input statement?
Mention how to limit decimal places for the variable using proc means?
Are you involved in writing the inferential analysis plan? Tables specfications?
What is factor analysis?
How will you use the WHO Drug Dictionary for Reporting Clinical Trials?
what is scheduling and how will u implement it. In scheduling 5 jobs r running if there is an error occured at 3rd job and how will u check and waht necessary steps will u take not to repeat the same mistake
How to create an external dataset with sas code?
i want for interview question & answer plz it need immediate send t my mail raviprakashmot@gmal.cm
Explain what is the use of proc gplot?
What would be the result of the following SAS function (given that 31 Dec, 2000 is Sunday)?
Give e an example of..
How would you code a merge that will write the matches of both to one data set, the non-matches from the left-most data?
What is the use of stop statement?
What are the limitations for memory allocation for SAS variables