Online File
Rick Aster: Professional SAS Programming Shortcuts: Contents
proc summary data=table1; var key; output out=maxkey max=max; run; data n (keep=key) / view=n; set maxkey; do key = 1 to max; output; end; run; data table2 (drop=key); merge n table1 (in=is); by key; valid = is; length valid 3; run;