What is _n_?

Answer Posted / mallikarjuna raju

This is an automatic variable of PDV that returns the no of
observations that it has iterated.There are such variables
like _Error_,end=,in=,first.by-variable,last.by-variable,..etc
All these variables will not be displayed in the target output.
Ex:
Data new;
set <existed>;
if _n_>=2 and <=6 then output;

Is This Answer Correct ?    5 Yes 2 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What would be the value of month at the end of data step execution and how many observations would be there?

567


What is the difference between nodupkey and nodup options?

588


What is the function of output statement in a SAS Program?

601


What is the sas data set? : sas-grid-administration

560


Name some categories in sas 9? : sas-grid-administration

551






How you can read the variables that you need?

645


Differentiate input and infile.

587


what is transformation in sas data integration? : Sas-di

539


describe how to adjust the performance of data integrator? : Sas-di

552


what is treatment emergent events and treatment emregent adverse event

1932


What do you code to create a macro? : sas-macro

563


How to convert a numeric variable to a character variable?

624


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

753


What are the five ways to do a table lookup in sas? : sas-grid-administration

584


How necessary is it to be creative in your work?

2012