SASUnit Examples  Version 1.2.1
_sasunit_getautocallnumber.sas
Go to the documentation of this file.
1 
22 %MACRO _sasunit_getAutocallNumber (
23  i_object
24 );
25 
26 %LOCAL l_path;
27 %LET l_path = &g_sasautos/&i_object;
28 %IF %sysfunc(fileexist(&l_path)) %THEN %DO;
29  0
30  %RETURN;
31 %END;
32 
33 %LOCAL i;
34 %DO i=1 %TO 9;
35  %LET l_path = &&g_sasautos&i/&i_object;
36  %IF %sysfunc(fileexist(&l_path)) %THEN %DO;
37  &i
38  %RETURN;
39  %END;
40 %END;
41 
42 .
43 
44 %MEND _sasunit_getAutocallNumber;
46 /*
47 %LET g_sasautos=c:\projects\sasunit\saspgm\sasunit;
48 %LET g_sasautos1=c:\temp;
49 
50 %put %_sasunit_getAutocallNumber(deldir.sas);
51 */