57%macro mp_assertcols(inds,
61 outds=work.test_results
64 %mp_abort(iftrue= (&syscc ne 0)
66 ,msg=%str(syscc=&syscc - on macro entry)
70 %let lib=%scan(&inds,1,%str(.));
71 %let ds=%scan(&inds,2,%str(.));
72 %let cols=%upcase(&cols);
74 %mp_abort(iftrue= (%mf_existds(&lib..&ds)=0)
76 ,msg=%str(&lib..&ds not found!)
79 %mp_abort(iftrue= (&cols=0)
81 ,msg=%str(No cols provided)
85 %let test=%upcase(&test);
87 %
if &test ne ANY and &test ne ALL and &test ne NONE %then %
do;
90 msg=%str(Invalid test - &test)
98 %
if %mf_existVarList(&inds,&cols)=1 %then %let result=ALL;
100 %local targetcols compare;
101 %let targetcols=%upcase(%mf_getvarlist(&inds));
102 %let compare=%mf_wordsinstr1butnotstr2(
106 %
if %cmpres(&compare)=%cmpres(&cols) %then %let result=NONE;
107 %
else %let result=SOME;
111 length test_description $256 test_result $4 test_comments $256;
112 test_description=symget(
'desc');
113 if test_description=
'0'
114 then test_description=
"Testing &inds for existence of &test of: &cols";
117 test_comments=
"&sysmacroname: &inds has &result columns ";
118 %
if &test=ALL %then %
do;
119 %
if &result=ALL %then %
do;
123 %
else %
if &test=ANY %then %
do;
124 %
if &result=SOME %then %
do;
128 %
else %
if &test=NONE %then %
do;
129 %
if &result=NONE %then %
do;
134 test_comments=
"&sysmacroname: Unsatisfied test condition - &test";
140 proc append base=&outds data=&ds;