12-16-2014 07:14 AM
Have a look at SASHELP.VCOLUMN, this holds all the variables of each dataset in all libraries. There is also SASHELP.VTABLE which holds the dataset information. These are the same as DICTIONARY.* in SQL.
12-16-2014 07:36 AM
Thanks for the useful information, but i am seeking the members of system directory not only SAS.
In other words if i have a list of excel files or word documents etc... how to capture all those files in a sas dataset with the DOS attributes (name,date modified,type,size etc....)
12-16-2014 07:44 AM
Either use the x statement or call system routine to execute dir directory > somefile.lst, and then read from somefile.lst, or use
filename oscmd pipe "dir directory";
infile oscmd truncover;
input dirline $1024.;
Be aware that all this may not work when SAS operates under the -noxcmd commandline option.
12-16-2014 08:35 AM
Thanks for this approach.
After running the above code, a listing of the different members were collected as line records.
Hence a search is required to determine the required factor.
12-16-2014 09:04 AM
What is it your trying to get, give specific examples? There are many options that you can put on the directory command, in your command prompt window, type dir /? and you will see them. Yes, if you want lots of information then you will need to parse the incoming string, it is not however particularly difficult, substr(1,first blank gives filename, then drop that, then to next blank gives size etc.