Here the SAS code portion that returns an indicator macro variable if the condition is met or not.
%macro check_mod_date(file_name);
data info;
length infoname infoval $60;
rc=filename('ext_file', "&file_name");
fid=fopen('ext_file');
infonum=foptnum(fid);
do i=1 to infonum;
infoname=foptname(fid, i);
if find(infoname,'Last Modified','it') then
do;
infoval=finfo(fid, infoname);
last_modified_dttm=input(infoval,datetime18.);
if datetime()-last_modified_dttm<86400 then condition_met_flg=1;
else condition_met_flg=0;
leave;
end;
end;
call symputx('condition_met_flg',condition_met_flg,'g');
close=fclose(fid);
rc=filename('ext_file');
run;
%mend;
%check_mod_date(C:\temp\create_data.sas);
%put &=condition_met_flg;
54 %put &=condition_met_flg;
CONDITION_MET_FLG=1
... View more