diff --git a/all.sas b/all.sas index 6cdd079..27c485e 100644 --- a/all.sas +++ b/all.sas @@ -24216,15 +24216,12 @@ run; The function uses `dosubl()` to run the `table.fileinfo` action, for the specified library, filtering for `*.sashdat` tables. - IMPORTANT NOTE - The results are cached in a WORK table (&outprefix._&lib). - If that table already exists, it is queried instead, to avoid the - dosubl() performance hit. - - To force a rescan, just use a new `&outprefix` value, or delete the table(s) - before running the function. + Results are cached in a WORK table (&outprefix._&lib). If that table + already exists it is queried directly to avoid the dosubl() overhead. + To force a rescan, use a new `&outprefix` value or delete the cache + table before calling. @param [in] libds library.dataset - @param [in] usecache= (1) Set to 0 to rebuild the cache @param [out] outprefix= (work.mfv_existsashdat) Used to store current HDATA tables to improve subsequent query performance. This reference is a prefix and is converted to `&prefix._{libref}` @@ -24235,14 +24232,13 @@ run; @author Mathieu Blauw **/ -%macro mfv_existsashdat(libds,usecache=1,outprefix=work.mfv_existsashdat -); +%macro mfv_existsashdat(libds,outprefix=work.mfv_existsashdat); %local rc dsid name lib ds; %let lib=%upcase(%scan(&libds,1,'.')); %let ds=%upcase(%scan(&libds,-1,'.')); -/* if table does not exist, create it */ -%if &usecache ne 1 or %sysfunc(exist(&outprefix._&lib)) ne 1 %then %do; +/* if cache table does not exist, build it */ +%if %sysfunc(exist(&outprefix._&lib)) ne 1 %then %do; %let rc=%sysfunc(dosubl(%nrstr( /* Read in table list (once per &lib per session) */ proc cas;