I want to search through a bunch of sas programs and find one word strings. The ouput dataset called found contains the job that has the matching string.
This is one way I approached it but get stock when trying to output or using the filevar:
I created a proglist text file that contains all my programs ( more than a 100) which I loaded them into a sas data set named progs. I take this progs set and
data progs;
infile proglist;
input @1 program $88.;
run;
filename name '/dir/';
data found;
set progs;
prog = '/dir/'||program;
infile name filevar=prog end=done;
do while (not done);
if index(_INFILE_, "FINDTHIS") > 0 then do; found = 1;output; end;
end;
run;