c**********e 发帖数: 2007 | 1 I need to search all data files in a folder, and give
the names the data files which contain a string.
Does anybody has any idea?
One way is to save all SAS datasets to Excel files in
another folder, then search it in Excel.
My question is if it is doable in SAS along. |
D******n 发帖数: 2836 | 2 contain a specified string or contain only one string?
which situations do u mean?
【在 c**********e 的大作中提到】 : I need to search all data files in a folder, and give : the names the data files which contain a string. : Does anybody has any idea? : One way is to save all SAS datasets to Excel files in : another folder, then search it in Excel. : My question is if it is doable in SAS along.
|
c**********e 发帖数: 2007 | 3 Of course, a specified string, say "Banana".
There are many SAS datasets. The search will help me
to find the dataset.
【在 D******n 的大作中提到】 : contain a specified string or contain only one string? : which situations do u mean?
|
d********h 发帖数: 2048 | 4 yes, you can. I did that long time ago. At that time, I used a macro to
search 1000 files to get one data. |
p********a 发帖数: 5352 | 5 data banana1;
run;
proc sql;
select memname from dictionary.members
where libname='WORK' and find(upcase(memname),'BANANA');
quit; |
D******n 发帖数: 2836 | 6 in linux
grep Banana * -l
【在 c**********e 的大作中提到】 : Of course, a specified string, say "Banana". : There are many SAS datasets. The search will help me : to find the dataset.
|
c**********e 发帖数: 2007 | 7 Thanks, but the procedure only searches the names of all data file.
My question is to search the contents of all files. Do you have
some way to do it? Thanks a lot.
【在 p********a 的大作中提到】 : data banana1; : run; : proc sql; : select memname from dictionary.members : where libname='WORK' and find(upcase(memname),'BANANA'); : quit;
|