Hi Tom, Some valid comments there but perhaps my use case helps define the solution more precisely. Basically, I have around 30 macros all doing similar cuts against the same segments across various datasets, with the common segment being macro_products, Each of those macros creates individual tables and requires outputting to a common data, relative to the product segement. So 19 segments have 19 * x views and those views need outputting to 19 datafiles for use locally. In order to simplify my code, I wanted to prescribe those segements and affiliated outcomes (tables names, out files, excel sheet names, etc) up front, so i could aviod replicating lists later in the code base. In my mind, this eased the administration burden by bringing every segment and associated output type into an upfront routine - my macro variables. Needless to say, with the advice Astounding gave, I've been able to replace explicit array lists throughout my code, which iterated through the product segments using the upfront macro variables. So, for example, the following [original] code was simplified and any, affiliated macro variable lists are updated in the same code location. OLD:: data _null_; array run_tables {21} $100 ("table1","table2",...,"tablen"); array run_products {21} $100 ("product1","product2",...,"productn"); do i = 1 to dim(run_tables); rep_table = dequote(run_tables(i)); rep_product = dequote(run_products(i)); /* Current Period */ call execute ('%metrics_sum (TblNm = msum, Pos = '||rep_table||', Prod = '||rep_product||')'); end; run; NEW: data _null_; array run_tables {¯o_outvars.} $100 (¯o_tables.); array run_products {¯o_outvars.} $100 (¯o_products.); do i = 1 to dim(run_tables); rep_table = dequote(run_tables(i)); rep_product = dequote(run_products(i)); /* Current Period */ call execute ('%metrics_sum (TblNm = msum, Pos = '||rep_table||', Prod = '||rep_product||')'); end; run; Everywhere I reference the list for run_tables / run_producst / etc, is now maintained in a single location in my code base.
... View more