BookmarkSubscribeRSS Feed
🔒 This topic is solved and locked. Need further help from the community? Please sign in and ask a new question.
SAS_AMUH
Obsidian | Level 7

PROC CONTENTs data=demo varnum; run;

I have just used the above code VARNUM for programming for the first time.

I used this because I thought that I could use it to assess if the data was imported accurately. 

For this reason, I checked the Number of observations, variables, and also confirmed that value is 0 for both "Deleted Observations" & "Number of Data Set Repairs". 

 

Q1. Any other tips for using this varnum code? for any other purposes?

 

Q2. I am having a bit of difficulty understanding some keywords in this output, especially 

- indexes, observation length, number of data set pages, Max Obs per Page, Obs in First Data Page  (I don't quite get which "page" it is)

Could someone please tell me or suggests a webpage explaining these keywords?

 

 Thank you for your help in advance.

Capture SAS.PNG

 

 

1 ACCEPTED SOLUTION

Accepted Solutions
Kurt_Bremser
Super User

SAS datasets are organized in "pages" of equal size. Observations are fit into a page by using the formula int(pagesize/observation length), the remaining space in a page is padded out.

Since the first page also contains the header information with all variable attributes, it has less space for observations.

Observation length is computed by adding up all variable lengths.

View solution in original post

1 REPLY 1
Kurt_Bremser
Super User

SAS datasets are organized in "pages" of equal size. Observations are fit into a page by using the formula int(pagesize/observation length), the remaining space in a page is padded out.

Since the first page also contains the header information with all variable attributes, it has less space for observations.

Observation length is computed by adding up all variable lengths.

SAS Innovate 2025: Call for Content

Are you ready for the spotlight? We're accepting content ideas for SAS Innovate 2025 to be held May 6-9 in Orlando, FL. The call is open until September 25. Read more here about why you should contribute and what is in it for you!

Submit your idea!

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
  • 1 reply
  • 866 views
  • 1 like
  • 2 in conversation