I am having a hard time trying how to code a macro to write out datasets based upon two variabiles, bucket and vintage;
My dataset looks like this:
input X Bucket Vintage;
10 1 1
20 1 1
30 1 2
40 1 2
50 1 3
60 1 3
70 2 1
80 2 1
90 2 2
100 2 2
110 2 3
120 2 3
;
I want to write out datasets in the format:
bucket_1_vintage_1
bucket_1_vintage_2
bucket_1_vintage_3
bucket_2_vintage_1
bucket_2_vintage 2
bucket_2_vintage_3
Simply hardcoding everything is rather cumbersome, because the actual dataset has 25 vintages, 10 buckets, and 10 variables. Simply replacing everything with a couple of macro lines would be greatly preferred.
Thanks in advance for your help!
My dataset looks like this:
input X Bucket Vintage;
10 1 1
20 1 1
30 1 2
40 1 2
50 1 3
60 1 3
70 2 1
80 2 1
90 2 2
100 2 2
110 2 3
120 2 3
;
I want to write out datasets in the format:
bucket_1_vintage_1
bucket_1_vintage_2
bucket_1_vintage_3
bucket_2_vintage_1
bucket_2_vintage 2
bucket_2_vintage_3
Simply hardcoding everything is rather cumbersome, because the actual dataset has 25 vintages, 10 buckets, and 10 variables. Simply replacing everything with a couple of macro lines would be greatly preferred.
Thanks in advance for your help!