BookmarkSubscribeRSS Feed
SamuelRajKandru
Quartz | Level 8

Is there any difference in the terms RECORD and OBSERVATION? Because the book says Input buffer holds a RECORD and PDV is the place where SAS holds an OBSERVATION. I'm thinking both the terms mean the same. Please help me if I'm wrong.


Inputbuffer.jpg
2 REPLIES 2
RW9
Diamond | Level 26 RW9
Diamond | Level 26

It seems to be quite clearly stated in the book there.  It referes to a "record" only when importing from a raw file.  The reason is because one observation may be split over many rows, you could read in row after row and then finally when you have all the information output the observation.  Take this example:

Name=abcde, surname=ghty

addr_line1=12 somewhere

addr_line2=earth

 

Now that is all one observation, but appears in 3 input records and to read it, you would hold the pointer over the line and continue until you had read the final data element.

Astounding
PROC Star

Going by my experience (not documented anywhere), there is no difference.  SAS tends to use the word OBSERVATION when talking about a record within a SAS data set, and RECORD when talking about a row of data from any other type of data.

 

While it's true that many raw data records can be combined into a single SAS observation, many other possibilities exist.  Just to list a few:

 

  • Creating multiple observations in a SAS data set from a single record of raw data
  • Creating multiple observations in an output SAS data set from a single observation within an incoming SAS data set
  • Combining multiple observations from a SAS data set into a single observation in an output SAS data set

If you were to be specific about the type of data (SAS data set vs. raw data vs. some other type of data), and whether the file you are talking about is an input file or an output file, there would be no difference between RECORD and OBSERVATION.

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!

How to Concatenate Values

Learn how use the CAT functions in SAS to join values from multiple variables into a single value.

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
  • 806 views
  • 5 likes
  • 3 in conversation