Thanks for help me guys 🙂 Now, I want to develop a new step. Consider this example: TABLE 01: I want the declare a variable X that is sum VALUES if CLASS = A. Therefore, X = 10 Then will run the code with variable X: data _null_;
if _N_ = 1 then do;
if 0 then set have;
declare hash h(dataset:'have(obs=0)',ordered:'y');
h.defineKey('id');
h.defineData('id','value');
h.defineDone();
end;
set have;
_k=_value;_value+value;
if _value<=X then h.add();
else if _value=X then do;h.output(dataset:'want');stop;end;
else if _value>X then do;value=value-_k-1;h.add();h.output(dataset:'want');stop;end;
run; Can you guys help to develop the first step, plz? Thanks 🙂
... View more