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

Popular posts from this blog

java - How to set log4j.defaultInitOverride property to false in jboss server 6 -

c - GStreamer 1.0 1.4.5 RTSP Example Server sends 503 Service unavailable -

Using ajax with sonata admin list view pagination -