7 keep Consecutive_Hits Exact_Count Total_Count;
8 format Consecutive_Hits 8.
9 Exact_Count Total_Count comma10.;
13 dcl hash consecHits(ordered:
"D",suminc:
"Exact_Count");
14 consecHits.defineKey(
"Consecutive_Hits");
15 consecHits.defineDone();
18 do until(last.Top_Bot);
19 set dw.atbats(keep=Game_SK Inning Top_Bot Is_A_Hit) end=lr;
20 by Game_SK Inning Top_Bot notsorted;
21 Consecutive_Hits = ifn(Is_A_Hit,Consecutive_Hits+1,0);
22 if Is_A_Hit then consecHits.ref();
26 do Consecutive_Hits = consecHits.num_items to 1 by -1;
27 consecHits.sum(sum:Exact_Count);
28 Total_Count = Exact_Count + Total_Adjust;
30 Total_Adjust + Exact_Count;