BookmarkSubscribeRSS Feed
s_manoj
Quartz | Level 8

Hi all,

hope all doing well and Happy new year to all,

I am beginner SAS, I got confused with some of the terms in SAS :

 1) observations

2) Records

3) Statements

can someone explain in detail about these words?

 

Thank you in advance

5 REPLIES 5
novinosrin
Tourmaline | Level 20

 1) observations= record= row

2) Records=observations=  row

3) Statements= perform an action

 

I highly recommend you get a book by author ron cody and read thoroughly: Just documentation alone may not help always

Learning SAS by Example: A Programmer's Guide
Book by Ron Cody
 
Image result for ron cody learning sas by example
 
Reeza
Super User

@s_manoj wrote:

Hi all,

hope all doing well and Happy new year to all,

I am beginner SAS, I got confused with some of the terms in SAS :

 1) observations

2) Records

3) Statements

can someone explain in detail about these words?

 

Thank you in advance


It depends a lot on context. 

Of those, STATEMENT is the only one with a specific SAS definition. Other ones are functions and routines. 

 

Here’s a list of documented SAS Statements, there are more, see the link regarding STATEMENTS documented elsewhere. 

 

http://documentation.sas.com/?docsetId=lestmtsref&docsetTarget=p08st7rzfn0dgin1fml8hq40hlho.htm&docs...

 

The official SAS definition is:

Definition of Statements
A SAS statement is a string of SAS keywords, SAS names, special characters, and operators that instructs SAS to perform an operation or that gives information to SAS. Each SAS statement ends with a semicolon.

 

All of of this is in the documentation and the first programming course is free. 

Cynthia_sas
SAS Super FREQ

Hi:

  As Reeza explained, much of this is in the documentation. Please look at this web page: http://go.documentation.sas.com/?docsetId=lrcon&docsetTarget=n1rwem8pleuq62n1guwd91poym5p.htm&docset... and at the illustration on the web page, as shown below:

obs_doc.png

And, this same information is conveyed in Programming 1 in Lesson 3, in the video entitled Examining SAS Data Sets, as shown below, starting at time stamp 00:11 -- The video explains that more common/relational terms are observations=rows and variables=columns. In the old mainframe days, we used to refer to "records" and "fields" which were essentially the same as rows and columns. record=row=observation and field=column=variable...it just depends on your vintage of describing tables or data sets or files.

obs_var.png

I hope this points you toward an understanding.

cynthia

art297
Opal | Level 21

I agree with the recommendations provided by @novinosrin and @Reeza, but there is definitely a distinction in SAS between records and observations.

 

Throughout the documentation records is used to describe the raw data being read into SAS, while observations is used to describe the individual rows of a SAS dataset. see, e.g., http://documentation.sas.com/?docsetId=basess&docsetTarget=n068wqvbjnndvjn17mqpoxdj7te7.htm&docsetVe...

 

Art, CEO, AnalystFinder.com

 

Cynthia_sas
SAS Super FREQ
Good point, Art!
cynthia

sas-innovate-2024.png

Available on demand!

Missed SAS Innovate Las Vegas? Watch all the action for free! View the keynotes, general sessions and 22 breakouts on demand.

 

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
  • 5 replies
  • 1728 views
  • 6 likes
  • 5 in conversation