Click on the Comments to view the Answers

Wednesday, January 20, 2010

The value of the automatic variable _n_

The value of the automatic variable _n_ is

a) the number of executions of a SET statement
b) the number of the current execution of the DATA step
c) a tally of all the observations output to a dataset so far
d) equal to the total number of observations in the current input SAS dataset

Check the comments for answers...

3 comments:

SASGuru said...

The value of the _N_ is the Number of the current execution of the Data step...

Check for this

data cool;
do i=1 to 5;
output;
put _all_;
end;
run;

the value of _N_ would always be 1

Dhammadip said...

in simple words _n_ keeps track of observation number...as SAS executes for each observation so ans is B

Dhammadip said...
This comment has been removed by the author.

Post a Comment



Technology Top Blogs On our way to 1,000,000 rss feeds - millionrss.com Hihera.com Blog Directory - OnToplist.com blogarama - the blog directory Blog Directory
Disclaimer

SAS and all other SAS Institute Inc. product or service names are registered trademarks or trademarks of SAS Institute Inc. in the USA and other countries. ® indicates USA registration.

Other brand and product names are trademarks of their respective companies.

This blog is not responsible for any kind of copyright violation. This blog just collects the links hosted or posted by other servers/people/search engines.The creator of this page or the ISP(s) hosting any content on this site take no responsibility for the way you use the information provided on this site.If anybody has any copyright claim on it and doesn’t wish the information provided to be shown on our site, please do respond to this email. We shall remove them off immediately. Any inconvenience is regretted. Please do mention your exact grievance/problems with respect to certain third party links. We assure you that appropriate action will be taken off. Thank you