SASUnit Examples  Version 1.5.0
_existdir.sas
Go to the documentation of this file.
1 
24 %MACRO _existDir(i_dir
25  );
26  %LOCAL rc did filrf;
27  %LET filrf=_tmpf;
28  %LET rc=%sysfunc(filename(filrf,&i_dir));
29  %LET did=%sysfunc(dopen(_tmpf));
30  /* directory opened successfully */
31  %IF &did NE 0 %THEN %DO;
32  1
33  %LET rc=%sysfunc(dclose(&did));
34  %END;
35  /* directory could not be opened */
36  %ELSE %DO;
37  0
38  %END;
39  %LET rc=%sysfunc(filename(filrf));
40 %MEND _existDir;