Macros for SAS Application Developers
https://github.com/sasjs/core
Loading...
Searching...
No Matches
mp_runddl.sas
Go to the documentation of this file.
1
/**
2
@file mp_runddl.sas
3
@brief An opinionated way to execute DDL files in SAS.
4
@details When delivering projects there should be seperation between the DDL
5
used to generate the tables and the sample data used to populate them.
6
7
This macro expects certain folder structure - eg:
8
9
rootlib
10
|-- LIBREF1
11
| |__ mytable.ddl
12
| |__ someothertable.ddl
13
|-- LIBREF2
14
| |__ table1.ddl
15
| |__ table2.ddl
16
|-- LIBREF3
17
|__ table3.ddl
18
|__ table4.ddl
19
20
Only files with the .ddl suffix are executed. The parent folder name is used
21
as the libref.
22
Files should NOT contain the `proc sql` statement - this is to prevent
23
statements being executed if there is an err condition.
24
25
Usage:
26
27
%mp_runddl(/some/rootlib) * execute all libs ;
28
29
%mp_runddl(/some/rootlib, inc=LIBREF1 LIBREF2) * include only these libs;
30
31
%mp_runddl(/some/rootlib, exc=LIBREF3) * same as above ;
32
33
34
@param [in] path location of the DDL folder structure
35
@param [in] inc= list of librefs to include
36
@param [in] exc= list of librefs to exclude (takes precedence over inc=)
37
38
@version 9.3
39
@author Allan Bowe
40
@source https://github.com/sasjs/core
41
42
**/
43
44
%macro mp_runddl(path, inc=, exc=
45
)
/*/STORE SOURCE*/
;
46
47
48
49
%mend mp_runddl;
base
mp_runddl.sas
Generated by
1.9.8
For more information visit the
Macro Core library
.