BookmarkSubscribeRSS Feed
robertrao
Quartz | Level 8


hi,

For ex i have 4 records in a dataset.

data demog;

set have;

run;

Have dataset has these 4 records

name  age 

kevin   23

peter   28

louis   33

...

...

...

first the Input buffer is set blank or missing accordingly.

it reads the first observation writes to the dataset

It then goes to the beginning of the datastep. NOW  how will SAS know  that it has already read the first one AFTER RETURNING TO THE BEGINNING OF THE DATA STEP????

Could someone tell me the process how it works??????

2 REPLIES 2
robertrao
Quartz | Level 8

Sorry about that,,,I went back to my Basics and learnt that it is because of the _n_=

Tom
Super User Tom
Super User

Try running this little step to see how it works in more detail.

data new;

  put 'BEFORE ' _n_= age= eof=;

  set have end=eof ;

  put 'AFTER  ' _n_= age= eof=;

run;

sas-innovate-2024.png

Don't miss out on SAS Innovate - Register now for the FREE Livestream!

Can't make it to Vegas? No problem! Watch our general sessions LIVE or on-demand starting April 17th. Hear from SAS execs, best-selling author Adam Grant, Hot Ones host Sean Evans, top tech journalist Kara Swisher, AI expert Cassie Kozyrkov, and the mind-blowing dance crew iLuminate! Plus, get access to over 20 breakout sessions.

 

Register now!

What is Bayesian Analysis?

Learn the difference between classical and Bayesian statistical approaches and see a few PROC examples to perform Bayesian analysis in this video.

Find more tutorials on the SAS Users YouTube channel.

Click image to register for webinarClick image to register for webinar

Classroom Training Available!

Select SAS Training centers are offering in-person courses. View upcoming courses for:

View all other training opportunities.

Discussion stats
  • 2 replies
  • 603 views
  • 0 likes
  • 2 in conversation