I am trying to get a list of all SAS files (with path names) on a drive and I am using the code that was I found on here of someone trying to do what I need to do- but I it is not working-
filename search pipe 'for /r U:\REPI\population\saspop %i in (*.sas7bdat) do @findstr /i /m "obs=max" "%i"';
data search_results;
infile search length=_len;
input @1 filepath $varying512. _len;
run;
NOTE: The infile SEARCH is:
Unnamed Pipe Access Device,
PROCESS=for /r U:\REPI\population\saspop %i in (*.sas7bdat) do @findstr /i /m "obs=max" "%i",
RECFM=V,LRECL=256
NOTE: 0 records were read from the infile SEARCH.
NOTE: The data set WORK.SEARCH_RESULTS has 0 observations and 1 variables.
NOTE: DATA statement used (Total process time):
real time 9:31.21
cpu time 0.06 seconds
thank you! that worked!!
It's finally time to hack! Remember to visit the SAS Hacker's Hub regularly for news and updates.
Learn how use the CAT functions in SAS to join values from multiple variables into a single value.
Find more tutorials on the SAS Users YouTube channel.
Ready to level-up your skills? Choose your own adventure.