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;
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.