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-2024.png

Don't miss out on SAS Innovate - Register now for the FREE Livestream!

Can't make it to Vegas? No problem! Watch our general sessions LIVE or on-demand starting April 17th. Hear from SAS execs, best-selling author Adam Grant, Hot Ones host Sean Evans, top tech journalist Kara Swisher, AI expert Cassie Kozyrkov, and the mind-blowing dance crew iLuminate! Plus, get access to over 20 breakout sessions.

 

Register now!

New Learning Events in April

 

Join us for two new fee-based courses: Administrative Healthcare Data and SAS via Live Web Monday-Thursday, April 24-27 from 1:00 to 4:30 PM ET each day. And Administrative Healthcare Data and SAS: Hands-On Programming Workshop via Live Web on Friday, April 28 from 9:00 AM to 5:00 PM ET.

LEARN MORE

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