BookmarkSubscribeRSS Feed
fierceanalytics
Obsidian | Level 7

Hello, 

"proc freq data=w; table year/missing list ; run;" shows there are 4 years, 45 observations each. Total is 180. Simple. 

 

Now "proc contents data=w(where=(year=1)); run;" ---- how many observations are expected to show in the result? 

Thanks

 

 

 

5 REPLIES 5
PaigeMiller
Diamond | Level 26

Your PROC CONTENTS should show 180 observations.


The WHERE clause is meaningless for PROC CONTENTS.

--
Paige Miller
andreas_lds
Jade | Level 19

Proc contents prints metadata, the where-option has no impact on the metadata of the processed dataset, there are still 180 obs in your dataset.

fierceanalytics
Obsidian | Level 7
I look up documentation. Not seeing where there is list of procedures that are exception as such. Does anyone know where to find it? Thank you
Tom
Super User Tom
Super User

@fierceanalytics wrote:
I look up documentation. Not seeing where there is list of procedures that are exception as such. Does anyone know where to find it? Thank you

What is that you looking for in the documentation?

The concept that a WHERE has no impact is PROC CONTENTS is just common sense.  Not clear if there is any need (any way) to document that.

FreelanceReinh
Jade | Level 19

Hello @fierceanalytics,

 

I think the list of [Base SAS] Procedures That Support the WHERE Statement is what you're looking for. PROC CONTENTS is not listed there, as expected.

SAS Innovate 2025: Register Now

Registration is now open for SAS Innovate 2025 , our biggest and most exciting global event of the year! Join us in Orlando, FL, May 6-9.
Sign up by Dec. 31 to get the 2024 rate of just $495.
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.

SAS Training: Just a Click Away

 Ready to level-up your skills? Choose your own adventure.

Browse our catalog!

Discussion stats
  • 5 replies
  • 884 views
  • 0 likes
  • 5 in conversation