Hi Community,
I received 30 plus SAS datasets and want to quickly retrieve all the variable names of each datasets
Is there a quick way to do this?
Thanks as always
This will give you a little more than what you are requesting, but you will probably find it all useful:
libname me 'path to folder holding your SAS data sets';
proc contents data=me._all_;
run;
SASHELP.VCOLUMN
how?
I am using SAS 9.4
Thanks
proc sql;
create table want as
select *
from sashelp.vcolumn
where libname = "LIBNAME";
quit;
I'm assuming you do know how to create a library references. Replace the libname in quotes with the libname you use in upper case and that should work. SASHELP is a default library available and you can navigate to the data sets to see what they contain.
@zimcom wrote:
SASHELP.VCOLUMN
how?
I am using SAS 9.4
Thanks
This will give you a little more than what you are requesting, but you will probably find it all useful:
libname me 'path to folder holding your SAS data sets';
proc contents data=me._all_;
run;
SAS Innovate 2025 is scheduled for May 6-9 in Orlando, FL. Sign up to be first to learn about the agenda and registration!
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.
Ready to level-up your skills? Choose your own adventure.