From 7823933cf7ceb1462d60bab355343da4a56dfd99 Mon Sep 17 00:00:00 2001 From: munja Date: Sat, 4 Dec 2021 14:24:28 +0000 Subject: [PATCH] feat: adding iftrue condition to mp_dropmembers for easier debug management --- base/mp_dropmembers.sas | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/base/mp_dropmembers.sas b/base/mp_dropmembers.sas index 6e58365..caeb732 100755 --- a/base/mp_dropmembers.sas +++ b/base/mp_dropmembers.sas @@ -17,8 +17,9 @@ @li mf_isblank.sas - @param list space separated list of datasets / views, WITHOUT libref - @param libref= (WORK) Note - you can only drop from a single library at a time + @param [in] list space separated list of datasets / views, WITHOUT libref + @param [in] libref= (WORK) Note - you can only drop from one library at a time + @param [in] iftrue= (1=1) Conditionally drop tables, eg if &debug=N @version 9.2 @author Allan Bowe @@ -28,8 +29,11 @@ %macro mp_dropmembers( list /* space separated list of datasets / views */ ,libref=WORK /* can only drop from a single library at a time */ + ,iftrue=%str(1=1) )/*/STORE SOURCE*/; + %if not(%eval(%unquote(&iftrue))) %then %return; + %if %mf_isblank(&list) %then %do; %put NOTE: nothing to drop!; %return;