I am having an issue trying to write out a bunch of different datasets to excel spreadsheets. The problem lies in the fact that I need to maintain multiple datasets for multiple product types. Something like...
product_1_variable_1.xls
product_1_variable_2.xls
product_1_variable_3.xls
product_1_variable_1.xls
product_2_variable_2.xls
product_3_variable_3.xls
product_1_variable_1.xls
product_2_variable_2.xls
product_3_variable_3.xls
...except there are so many products and variables that is too much to simply change manually.
I have tried putting a macro into the quoted string following the outfile statement in the Proc Export function, but SAS wont recognize it.
I see two ways to resolve this, but I dont know how to do either...
1. Somehow include a macro in the quoted string, so that I can hardcode the variable into the statement but put the product into a macro (%let product=type1 and then call it with &product).
2. Batch process the entire work folder through a proc export, wherein the output file would maintain the name that it has in the work folder.
Does anybody have any suggestions here?
product_1_variable_1.xls
product_1_variable_2.xls
product_1_variable_3.xls
product_1_variable_1.xls
product_2_variable_2.xls
product_3_variable_3.xls
product_1_variable_1.xls
product_2_variable_2.xls
product_3_variable_3.xls
...except there are so many products and variables that is too much to simply change manually.
I have tried putting a macro into the quoted string following the outfile statement in the Proc Export function, but SAS wont recognize it.
I see two ways to resolve this, but I dont know how to do either...
1. Somehow include a macro in the quoted string, so that I can hardcode the variable into the statement but put the product into a macro (%let product=type1 and then call it with &product).
2. Batch process the entire work folder through a proc export, wherein the output file would maintain the name that it has in the work folder.
Does anybody have any suggestions here?