Re: How to output the file names under a folder to a SAS dataset? #2

  • Follow


I don't know if you have your answer yet, but this might help:

PROC CONTENTS DATA=INLIB._ALL_ OUT=TMP;
RUN;

PROC SQL;
 CREATE TABLE TMP1 AS SELECT DISTINCT MEMNAME FROM TMP;
QUIT;

This code will create a dataset with a list of all SAS datasets within the
directory INLIB.  Be aware that it actually does a proc contents on all
datasets so, if you are dealing with a significant number of datasets,
this may take time/CPU.

However, the up side is you can do all kinds of things with the data.
Like you can also include CRDATE and MODATE and NOBS in your final dataset
so that you can determine when the dataset was created/modified and if the
dataset is empty or has observations.

Good luck.
0
Reply nweston (87) 12/8/2009 5:15:20 PM


0 Replies
283 Views

(page loaded in 0.023 seconds)

Similiar Articles:













7/21/2012 7:53:17 PM


Reply: