In regular 4gl I do: data table_input;
X = 7; output;
X = 3; output;
X = 7; output;
X = 2; output;
X = 7; output;
X = 4; output;
X = 7; output;
X = 4; output;
X = 3; output;
X = 7; output;
run;
data _null_;
set table_input end = eof;
if _n_ = 1 then do;
length COUNT 8;
declare hash h (suminc:1, keysum:'COUNT');
h.definekey ('X');
h.definedone ();
end;
h.ref ();
if eof then h.output (dataset: 'table_output');
run; I get the number of occurrences of the variable X as the results. It's ok. How to do it in DS2? There is no keysum variable in DS2, I don't know how to add a Count that has the number of occurrences of X in the output table.
... View more