03-28-2016 10:18 AM
%do i=1 %to 24;
lossmit.loss_mit_settlements_&last_month.*/ (keep=loan_number type actual_completion_date)
This code at one time pulled a dataset that already compiled loss_mit settlements into one dataset for the previous month
was automatically compiled into one previous month dataset called loss_mit_settlements_201602
The data no longer offers this. It separates each data set individually. Is there a way to use the same macro to compile all daily datasets into one previous month file to essentially mirror what I used to have when the dataset was combine already.
03-28-2016 10:42 AM
If either of these would be appropriate, they are available:
set lossmit.loss_mit_settlements_2016: (keep=loan_number type actual_completion_date);
set lossmit.loss_mit_settlements_201602: (keep=loan_number type actual_completion_date);
03-28-2016 10:48 AM
You would have to provide more details about the names of the data sets involved.
If this is part of an input proceess you might describe the incoming original datasets and how you read them.
The way your current example macro is displayed you would read a single dataset 24 times as you are not changing the name at all.
Note that if you have similar dataset names you can use a list modifier : to get all of the data sets that start with the same characters. For example if your datasets are loss_mit_settlements_Feb_01 loss_mit_settlements_Feb_02 loss_mit_settlements_Feb_03
then you could use
Set loss_mit_settlements_Feb_: ;
To read all of the sets that start with loss_mit_settlements_Feb_