22%let testcaslib = Public;
24 table.caslibInfo result=r / ;
26 do row over r.CASLibInfo;
27 if upcase(row.Name) = upcase(
"&testcaslib") then found = 1;
30 print
"ERROR: caslib &testcaslib not available";
34%put NOTE: Using testcaslib=&testcaslib;
39 load data=sashelp.baseball outcaslib=
"&testcaslib" casout=
"&tab1" replace;
40 save casdata=
"&tab1" incaslib=
"&testcaslib"
41 casout=
"&tab1..sashdat" outcaslib=
"&testcaslib" replace;
42 droptable casdata=
"&tab1" incaslib=
"&testcaslib" quiet;
47%put TEST 1 - returns 1 when the sashdat file exists in the caslib;
50 iftrue=(%mfv_existsashdat(&testcaslib..&tab1)=1),
51 desc=Test 1 - Check returns 1 for a sashdat that exists
55%put TEST 2 - returns 0 when the file does not exist in the caslib;
57%mp_assertscope(SNAPSHOT)
59 iftrue=(%mfv_existsashdat(&testcaslib..DOESNOTEXIST_%mf_uid())=0),
60 desc=Check returns 0 for a sashdat that does not exist
62%mp_assertscope(COMPARE,
63 desc=Check mfv_existsashdat does not leak macro variables into GLOBAL scope
70 deletesource casdata=
"&tab1..sashdat" incaslib=
"&testcaslib" quiet;