60%macro mp_assertcols(inds,
64 outds=work.test_results
67 %mp_abort(iftrue= (&syscc ne 0)
69 ,msg=%str(syscc=&syscc - on macro entry)
73 %let lib=%scan(&inds,1,%str(.));
74 %let ds=%scan(&inds,2,%str(.));
75 %let cols=%upcase(&cols);
77 %mp_abort(iftrue= (%mf_existds(&lib..&ds)=0)
79 ,msg=%str(&lib..&ds not found!)
82 %mp_abort(iftrue= (&cols=0)
84 ,msg=%str(No cols provided)
88 %let test=%upcase(&test);
90 %
if &test ne ANY and &test ne ALL and &test ne NONE %then %
do;
93 msg=%str(Invalid test - &test)
101 %
if %mf_existVarList(&inds,&cols)=1 %then %let result=ALL;
103 %local targetcols compare;
104 %let targetcols=%upcase(%mf_getvarlist(&inds));
105 %let compare=%mf_wordsinstr1butnotstr2(
109 %
if %cmpres(&compare)=%cmpres(&cols) %then %let result=NONE;
110 %
else %let result=SOME;
114 %let rsds=work.%mf_getuniquename(prefix=mp_assertcols);
118 test_description=symget(
'desc');
119 if test_description=
'0'
120 then test_description=
"Testing &inds for existence of &test of: &cols";
123 test_comments=
"&sysmacroname: &inds has &result columns ";
124 %
if &test=ALL %then %
do;
125 %
if &result=ALL %then %
do;
129 %
else %
if &test=ANY %then %
do;
131 %
if &result ne NONE %then %
do;
135 %
else %
if &test=NONE %then %
do;
136 %
if &result=NONE %then %
do;
141 test_comments=
"&sysmacroname: Unsatisfied test condition - &test";
145 proc append base=&outds data=&rsds;