BookmarkSubscribeRSS Feed
deleted_user
Not applicable
The data set I use is very large. There are hundreds of variables and I want to search whether some variable like "FIN" is included in the data set.
How can I do?

Another question is that: There are 40,000 observations and I want to choose some observations with "FIN=10181" and "FIN=10182" and "FIN=10183" and so on. How can I do that?

Thanks so much for your help.
3 REPLIES 3
sbb
Lapis Lazuli | Level 10 sbb
Lapis Lazuli | Level 10
Explore using DICTIONARY.COLUMNS with PROC SQL to analyze any SAS data library and/or member that has been declared with the LIBNAME statement.

If using PROC SQL or DATA/PROC step, you can select/filter using the IN operator in your WHERE statement/clause. Or you can string out the data-values as constants using IF OR OR THEN DO;

Scott Barry
SBBWorks, Inc.

Recommended Google advanced search arguments, this topic/post:

dictionary columns site:sas.com

where in operator site:sas.com
abdullala
Calcite | Level 5
other approaches in addition to using dictionary:

1. right-click on the dataset and choose 'view columns'
2. use proc contents
sbb
Lapis Lazuli | Level 10 sbb
Lapis Lazuli | Level 10
Agreed - also, PROCs like MEANS and FREQ can be quite useful for SAS database/variable/column "discovery".

Scott Barry
SBBWorks, Inc.

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 16. Read more here about why you should contribute and what is in it for you!

Submit your idea!

Health and Life Sciences Learning

 

Need courses to help you with SAS Life Sciences Analytics Framework, SAS Health Cohort Builder, or other topics? Check out the Health and Life Sciences learning path for all of the offerings.

LEARN MORE

Discussion stats
  • 3 replies
  • 3362 views
  • 0 likes
  • 3 in conversation