Hello everyone, I am trying to write the code for following scenario: 1. We have one excel sheet in which there is a column having filenames of .PPT files. All these PPTs are there on some location on the server, say /sasconf/sasconf/data/PPTs. 2. We want to check that for every record in Excel sheet there exist a file name having exactly the same name provided in every record. I have tried the following code logic, Which is not helping me. Is there any other logic or SAS function which can help me??? proc import out = proc_mast datafile= '/sasconf/sasconf/data/department_masters/Process_master.xls' DBMS = XLS Replace; sheet = 'Process_MO_Excel_Master'; getnames=yes; run; data temp; set proc_mast(keep = PPT_name); run; proc sql noprint; select count(*) into :cnt from temp; quit; proc sql noprint; select PPT_name into :count0-:count%sysfunc(strip(&cnt)) from temp; quit; %macro abc; data temp11; %do i=0 %to 35; %if fileexist("/sasconf/sasconf/data/Data For Configuration/Credit_risk/PPTs/&&count&i..ppt") %then exist_file=1; %else exist_file=0; output; %end; run; %mend abc; %abc Regards, Rakshit
... View more