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
Your PROC CONTENTS should show 180 observations.
The WHERE clause is meaningless for PROC CONTENTS.
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 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.
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.
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!
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.