What is _n_?

Answer Posted / pricil kurian

Hi ravi..ur answer is correct. ONE QUERY...for the below
example to get third record consecuitvely we need to
if mod(_n_,3)= 0 ; is in't?
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)= 0 then;
run;

Is This Answer Correct ?    0 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Explain proc sort?

673


What is factor analysis?

667


What system options would you use to help debug a macro? : sas-macro

646


what is data access? : Sas-di

613


Explain data_null_?

611






How do you control the number of observations and/or variables read or written?

753


Explain the special input delimiters used in sas programming.

589


which features do you use to check the data validations and errors? : Sas-administrator

554


What is the difference between class statement and by statement in proc means?

663


What areas of SAS are you most interested in?

1072


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?

643


Intern stastical programmer written test

290


what is the primary data source for the wrs? : Sas-bi

661


What are common programming errors committed in sas

677


What does P-value signify about the statistical data?

856