dc/sas/sasjs/macros/removecolsfromwork.sas
Mihajlo Medjedovic f268de21a3
Some checks failed
Test / Build-and-test-development (push) Failing after 6m14s
Test / Build-and-test-development-latest-adapter (push) Failing after 6m13s
init
2023-07-13 13:44:05 +02:00

38 lines
887 B
SAS

/**
@file removecolsfromwork.sas
@brief Temp fix to remove md5 content from tables
@details
proc json cannot handle the special characters in the md5 hash
<h4> SAS Macros </h4>
@li mp_dropmembers.sas
@li mf_isblank.sas
@version 9.4
@author 4GL Apps Ltd
@copyright 4GL Apps Ltd. This code may only be used within Data Controller
and may not be re-distributed or re-sold without the express permission of
4GL Apps Ltd.
**/
%macro removecolsfromwork(col);
/* only an issue if debug mode enabled */
%global _debug;
%if &_debug ge 131 %then %do;
%let col=%upcase(&col);
%local memlist;
proc sql noprint;
select distinct memname into: memlist
separated by ' '
from dictionary.columns
where libname='WORK' and upcase(name)="&col";
%if %mf_isblank(&memlist) %then %return;
%mp_dropmembers(list=&memlist)
%end;
%mend removecolsfromwork;