What is _n_?

Answers were Sorted based on User's Feedback



What is _n_?..

Answer / d.vijaya bhaskar

SAS variable to count the no of obs read.

Is This Answer Correct ?    2 Yes 1 No

What is _n_?..

Answer / natraj boga

An internal SAS counter in the data step which contains the
current iteration number of the data step.

Is This Answer Correct ?    2 Yes 1 No

What is _n_?..

Answer / varun kumar

_n_ is a automatic variable that can be used for processing.
It counts the number of times the data set begin to execute.

Is This Answer Correct ?    1 Yes 0 No

What is _n_?..

Answer / ashok kore

This is an automatic variable. It is used to count the
number of obs in dataset.Its added one for every iteration
of datastep.

Is This Answer Correct ?    2 Yes 2 No

What is _n_?..

Answer / sirisha

it indicates number of observations.

Is This Answer Correct ?    2 Yes 2 No

What is _n_?..

Answer / chiranjeevi

The _n_ is a automatic variable which displays the line number.

Is This Answer Correct ?    1 Yes 1 No

What is _n_?..

Answer / venkatesh.layam

while execution process automatic variable _n_ will be
created.it tells how many times data step has been
executed .

Is This Answer Correct ?    0 Yes 0 No

What is _n_?..

Answer / 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

What is _n_?..

Answer / mani

The automatic
variable _n_ counts iterations of the DATA step.

Is This Answer Correct ?    0 Yes 0 No

What is _n_?..

Answer / mahesh

Its an automatic variable.it shows no. of iterations gone
through in datastep.

Is This Answer Correct ?    0 Yes 0 No

Post New Answer

More SAS Interview Questions

What does a PROC TRANSPOSE do?

8 Answers   Accenture,


Hot to suppress characters from a given string?

4 Answers   CTS,


I have a SCD Type 2 Dimention for Location In which A Sales Office in Having two Surrogate Keys just because of the change in it's Sales Group. SKey SalesGroup Sales Office BeginDate EndDate 280 SG1 SO1 01APR2000 01APR2010 281 SG2 SO1 02APR2010 31MAR2999 Now while loading the Fact, the Lookup ir returning SKey 280 for records before and after 01APR2010. I am not able to give WHERE condition in the Lookup Properties (TranDate between BeginDate and EndDate). Please help.

0 Answers  


What is criteria for adverse events and treatment-emergent adverse events?

2 Answers   Accenture,


i have a data set with 20 observations i want label from 8 to 15 observations ? how you create this one.

6 Answers   CTS,






What is your favorite all time computer book? Why?

0 Answers   Oracle,


how to remove duplicates using proc sql?

0 Answers  


Why do we use QUIT commmand for proc datasets and proc sql ???

3 Answers  


how would you create a data set with 1 observation and 30 variables from a data set with 30 observations and 1 variable? : Sas programming

0 Answers  


How to test the debugging in sas?

0 Answers  


what is enterprise guide? What is the use of it? : Sas programming

0 Answers  


what the use of proc glm

1 Answers   Accenture, C Marc,


Categories