02-28-2014 03:01 PM
Hello Friends -
can someone please help on my question?
is there any way we can perform "proc contents" for all SAS data sets into one particular folder where we have all SAS data sets RATHER than doing it individually?
i am talking about performing below code for all SAS data sets at same time.
proc contents data=jim.test;
02-28-2014 03:50 PM
thanks Reeza. i found it.
libname test 'f:\market\dvjkhasfljk\';
proc contents data=test. _all_;
/*and it (html + sashelp.vtable + sashelp.vcolumn) has all the info. i need*/
02-28-2014 03:35 PM
proc contents is a hidden call to proc datasets with content statements. If you follow through the documentation of proc contents for DATA= option, you will find that
proc contents data=jim._ALL_;
should achieve your desired result. The notice for the MEMTYPE= in the documentation only applies if you want proc contents for library members that are not datasets as those are the default member types output.
If you are looking only for a particular element of information from proc contents though, the SASHELP tables mentionned by Reeza are probably a better alternative if you have many, many datasets in your library.
05-03-2016 06:58 PM
thanks for the post!
I like this as a basic template:
proc print data=SASHELP.VCOLUMN NOOBS; VAR libname memname memtype name type length label format informat; where label like "myField" AND LIBNAME='MyLibName_or_WORK' AND memname LIKE "%MyDataSetPattern%"; run;
Need further help from the community? Please ask a new question.