58%macro mp_assertcols(inds,
62 outds=work.test_results
65 %mp_abort(iftrue= (&syscc ne 0)
67 ,msg=%str(syscc=&syscc - on macro entry)
71 %let lib=%scan(&inds,1,%str(.));
72 %let ds=%scan(&inds,2,%str(.));
73 %let cols=%upcase(&cols);
75 %mp_abort(iftrue= (%mf_existds(&lib..&ds)=0)
77 ,msg=%str(&lib..&ds not found!)
80 %mp_abort(iftrue= (&cols=0)
82 ,msg=%str(No cols provided)
86 %let test=%upcase(&test);
88 %
if &test ne ANY and &test ne ALL and &test ne NONE %then %
do;
91 msg=%str(Invalid test - &test)
99 %
if %mf_existVarList(&inds,&cols)=1 %then %let result=ALL;
101 %local targetcols compare;
102 %let targetcols=%upcase(%mf_getvarlist(&inds));
103 %let compare=%mf_wordsinstr1butnotstr2(
107 %
if %cmpres(&compare)=%cmpres(&cols) %then %let result=NONE;
108 %
else %let result=SOME;
112 length test_result $5 test_description $256 test_comments $256;
113 test_description=symget(
'desc');
114 if test_description=
'0'
115 then test_description=
"Testing &inds for existence of &test of: &cols";
118 test_comments=
"&sysmacroname: &inds has &result columns ";
119 %
if &test=ALL %then %
do;
120 %
if &result=ALL %then %
do;
124 %
else %
if &test=ANY %then %
do;
126 %
if &result ne NONE %then %
do;
130 %
else %
if &test=NONE %then %
do;
131 %
if &result=NONE %then %
do;
136 test_comments=
"&sysmacroname: Unsatisfied test condition - &test";
142 proc append base=&outds data=&ds;