I have a table of which consists of a unique identifier, a records count, and two sets of 8 fields that are numbered 1 through 8. I want to separate the one large table into 8 separate tables with the unique identifier, the record count, and the two fields with the same number. I tried using a macro but it is not working and I don't know enough about macros to know how to do it properly. %macro pull_rank(rnk_nbr=); data mjr_def_rank_&rnk_nbr.; keep nbr_ssr rvw_cnt mjr_rnk_&rnk_nbr rnk_opn_mjr_&rnk_nbr; set mjr_def_cnts_x_ssr; run; %mend pull_rank; %pull_rank(rnk_nbr=1); %pull_rank(rnk_nbr=2) %pull_rank(rnk_nbr=3) %pull_rank(rnk_nbr=4) %pull_rank(rnk_nbr=5) %pull_rank(rnk_nbr=6) %pull_rank(rnk_nbr=7) %pull_rank(rnk_nbr=8) I am aware of do loops with n repetitions but have no experience with them. Any help you could give me would be greatly appreciated. I have had no in depth training so I apologize for the simplicity of my problem.
... View more