Hi Peter,, Thanks again for your help and it really good. But when I move to the next step : DATA Search_Obj_Names (KEEP=Srch_File Program_Nam Path); EOFC = 0; INFILE codedir MISSOVER TRUNCOVER END=EOFC ; RETAIN cnt 0; INPUT @ 1 Srch_File $256. ; cnt + 1; Backward = REVERSE(TRIM(srch_file)); last_slash = INDEX(Backward, '\'); IF last_slash = 0 THEN last_slash = INDEX(Backward, '/'); IF Last_slash = 0 THEN DO; Program = Srch_file; Path = Srch_file; END; ELSE DO; Program_Nam = REVERSE(SUBSTR(Backward, 1, Last_slash - 1)); Path = STRIP(REVERSE(SUBSTR(backward, Last_slash))); END; S7 = INDEX (Program_Nam, 'sas7bdat'); IF S7 THEN; ELSE OUTPUT; RUN; It throws an error : ERROR: No logical assign for filename CODEDIR. Please look into this and put your inputs plz. Thanks in advance
... View more