BookmarkSubscribeRSS Feed
☑ This topic is solved. Need further help from the community? Please sign in and ask a new question.
Ronein
Meteorite | Level 14
Let's say that I want to check all data sets exist in specific library ( for example:sashelp library) and for each data set check the columns names. I want to create a data set that have multiple columns, each column get values of the columns names of each data set.
So-
The data set get following columns names-
Sashelp.Cars
Sashelp.class
And so on

1 ACCEPTED SOLUTION

Accepted Solutions
ballardw
Super User
Proc sql;
  create table work.want as
  select * 
  from dictionary.columns
  where libname='SASHELP' and memtype='DATA'
  ;
quit;

Replace the SASHELP with the name of the library in upper case as that is the way the value is stored in the view. The DATA is to restrict to only data sets and also needs to be upper case as stored that way.

 

View solution in original post

4 REPLIES 4
Ronein
Meteorite | Level 14
But In real world I want to apply it on a permanent library that is not sashelp
ballardw
Super User
Proc sql;
  create table work.want as
  select * 
  from dictionary.columns
  where libname='SASHELP' and memtype='DATA'
  ;
quit;

Replace the SASHELP with the name of the library in upper case as that is the way the value is stored in the view. The DATA is to restrict to only data sets and also needs to be upper case as stored that way.

 

hackathon24-white-horiz.png

The 2025 SAS Hackathon Kicks Off on June 11!

Watch the live Hackathon Kickoff to get all the essential information about the SAS Hackathon—including how to join, how to participate, and expert tips for success.

YouTube LinkedIn

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
  • 4 replies
  • 629 views
  • 2 likes
  • 3 in conversation