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;
Good news: We've extended SAS Hackathon registration until Sept. 12, so you still have time to be part of our biggest event yet – our five-year anniversary!
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.