removecolsfromwork.sas
Go to the documentation of this file.
1 /**
2  @file removecolsfromwork.sas
3  @brief Temp fix to remove md5 content from tables
4  @details
5 proc json cannot handle the special characters in the md5 hash
6 
7  <h4> SAS Macros </h4>
8  @li mp_dropmembers.sas
9  @li mf_isblank.sas
10 
11  @version 9.4
12  @author 4GL Apps Ltd
13  @copyright 4GL Apps Ltd. This code may only be used within Data Controller
14  and may not be re-distributed or re-sold without the express permission of
15  4GL Apps Ltd.
16 **/
17 
18 %macro removecolsfromwork(col);
19 /* only an issue if debug mode enabled */
20 %global _debug;
21 %if &_debug ge 131 %then %do;
22  %let col=%upcase(&col);
23 
24  %local memlist;
25  proc sql noprint;
26  select distinct memname into: memlist
27  separated by ' '
28  from dictionary.columns
29  where libname='WORK' and upcase(name)="&col";
30 
31  %if %mf_isblank(&memlist) %then %return;
32 
33  %mp_dropmembers(list=&memlist)
34 
35 %end;
36 %mend removecolsfromwork;
37