Production Ready Macros for SAS Application Developers File Reference

An opinionated way to execute DDL files in SAS. More...

Go to the source code of this file.

Detailed Description

When delivering projects there should be seperation between the DDL used to generate the tables and the sample data used to populate them.

This macro expects certain folder structure - eg:

rootlib |– LIBREF1 | |__ mytable.ddl | |__ someothertable.ddl |– LIBREF2 | |__ table1.ddl | |__ table2.ddl |– LIBREF3 |__ table3.ddl |__ table4.ddl

Only files with the .ddl suffix are executed. The parent folder name is used as the libref. Files should NOT contain the proc sql statement - this is to prevent statements being executed if there is an err condition.


mp_runddl(/some/rootlib) * execute all libs ;

mp_runddl(/some/rootlib, inc=LIBREF1 LIBREF2) * include only these libs;

mp_runddl(/some/rootlib, exc=LIBREF3) * same as above ;

pathlocation of the DDL folder structure
inc=list of librefs to include
exc=list of librefs to exclude (takes precedence over inc=)
Allan Bowe @source

Definition in file