Macros for SAS Application Developers
https://github.com/sasjs/core
mf_existds.test.sas
Go to the documentation of this file.
1 /**
2  @file
3  @brief Testing mf_existfileref macro
4 
5  <h4> SAS Macros </h4>
6  @li mf_existds.sas
7  @li mp_assert.sas
8 
9 **/
10 
11 data work.testme;
12 x=1;
13 run;
14 
15 %mp_assert(
16  iftrue=(%mf_existds(work.testme)=1),
17  desc=Checking existing dataset exists,
18  outds=work.test_results
19 )
20 
21 %mp_assert(
22  iftrue=(%mf_existds(work.try2testme)=0),
23  desc=Checking non existing dataset does not exist,
24  outds=work.test_results
25 )