data have;
input BAT$ CAT DAT FAT$ GAT HAT;
CARDS;
as 6 .5 ez 2 12
es 3 .7 az 7 5
os 11 .2 yz 9 3
us 13 .4 uz 11 8
is 2 .8 iz 1 10
ys 5 .6 oz 4 13
; Hi everyone. First, I thank everyone who takes time to consider this exercise and provide feedback on the solution. Ok, here goes my challenge. 1. I need to accomplish this in one "proc SQL" procedure in SAS. 2. The product of the procedure should be a macro variable storing a single value. Just that. No revised/final table. 3. The stored value in the macro variable should be a simple count of the column averages of a source table "have" like the one attached. 4. The column averages that qualify for being counted should be those above a pre-determined threshold value (in the case of this example, the threshold = 1). 5. (Note:) Not all of the table columns are numeric, and obviously the non-numeric columns should not be counted. In the example image attached only 3 columns (CAT, GAT, HAT) averages qualify for counting, thus the macro variable takes the value: 3. Here are the inputs for source dataset "have": data have; input BAT$ CAT DAT FAT$ GAT HAT; CARDS; as 6 .5 ez 2 12 es 3 .7 az 7 5 os 11 .2 yz 9 3 us 13 .4 uz 11 8 is 2 .8 iz 1 10 ys 5 .6 oz 4 13 ; Thanks once more. Regards.
... View more