Macros for SAS Application Developers
https://github.com/sasjs/core
Loading...
Searching...
No Matches
mm_assigndirectlib.test.sas
Go to the documentation of this file.
1/**
2 @file
3 @brief Testing mm_assigndirectlib macro
4 @details A valid library must first be configured in metadata.
5 To test success, also define a table for which we can test the existence.
6 This is a unit test - not part of the full test run, as it would be a
7 lot of overhead to create an external DB and metadata setup each time.
8
9 <h4> SAS Macros </h4>
10 @li mf_existds.sas
11 @li mp_assert.sas
12 @li mp_assertscope.sas
13 @li mm_assigndirectlib.sas
14
15**/
16
17%let runtest=0;
18%let libref=XXX;
19%let ds=XXXX;
20
21
22%mp_assertscope(SNAPSHOT)
23%mm_assigndirectlib(&libref)
24%mp_assertscope(COMPARE)
25
26
27%mp_assert(
28 iftrue=(&runtest=1 and %mf_existds(&libref..&ds)),
29 desc=Check if &libref..&ds exists
30)