06-23-2015 09:12 AM
create table test as
I performed a macro to segment each dataset into its own dataset
create table test11_&monthyr as
The objective is to create something like this
The code runs however no segmenting occurs. What is the issue with my code. I am somewhat new to macro building. Note MonthYr is a date data type
06-23-2015 09:18 AM
Macros are not the answer here. You need to be able to write a successful program without using macros first. Once you have that part working correctly, writing the macro will be easy.
06-23-2015 09:21 AM
Are you looking to filter each of your data sets (test11_201502, test11_201503, etc..) only by the monthyr variable? Otherwise I would agree, a macro is not what you're looking for. You could loop through each individual monthyr variable one at a time to create the data set names you want, but with the code provided, you will just have the same data in each data set.