10-25-2013 01:50 AM
10-25-2013 02:21 AM
Like for variables Array definitions get defined during data step execution time. At this time variables n and m have not been populated. You therefore can't use SAS variables as part of an array element definition like done in code
You will need 2 data steps for this. In the first one you set the values for n and m and then load it into a SAS macro variable call symputx(). You then use in the second data step these macro variables within your array definition.
You are creating a lot of variables with your array. If you don't need all these variables then I would either drop them or - looking at your code - you could also use keyword _temporary_ as part of your array definition.