Production Ready Macros for SAS Application Developers
https://github.com/sasjs/core
mp_runddl.sas 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.

Usage:

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 ;

Parameters
pathlocation of the DDL folder structure
inc=list of librefs to include
exc=list of librefs to exclude (takes precedence over inc=)
Version
9.3
Author
Allan Bowe @source https://github.com/sasjs/core

Definition in file mp_runddl.sas.