loops - Insert a variable number of rows -
loops - Insert a variable number of rows -
currently, macro running insert constant number of rows:
%macro add_period; %do p = 1 %to 39; would able modify macro or create new macro run this, not 39 times, replace number of loops variable have table?
thank you!
use call symput turn variable(my_var) macro variable(loop_var)
data _null_; set your_table; phone call symput("loop_var", my_var); run; and utilize & resolve macro variable code
%macro add_period; %do p = 1 %to &loop_var; you pass macro variable parameters macro.
%macro add_period(loop_var); loops macros sas datastep
Comments
Post a Comment