|
"Choate, Paul@DDS" wrote:
> Heidi -
>
> You'll need to test each variable a1-a17 (possibly with an array) or
> concatenate them and test the concatenation. This concatenates,
> removes all the a, b, and c's and compares:
>
> data test;
> input a1 $ a2 $ ...snip...... a17 $;
>
> if length(cats(of a1-a17))> length(compress(cats(of a1-a17),'abc'))
> then delete;
Due to the length of the variables being $8, you will run into false
deletions.
E.g. a1='abc'; a2='aa';
This is more robust.
_all_ = '00'x || catx('00'x, of a1-a17) || '00'x;
array block[3] $1 ('a', 'b', 'c');
do _i_ = 1 to dim(block);
if index (_all_, cats('00'x,block[_i_],'00x') ) then delete;
end;
--
Richard A. DeVenezia
http://www.devenezia.com/
|