06-16-2016 12:24 PM
I am an experienced developer in everything but SAS.
I have a Dataset ---> "Periods" with a single column and 12 periods:
I want step thru each data format in the Periods table, run an query to pull based on each of the 12 dates, by setting the current period equal to a variable and using the variable as criteria for the pull.
I can do all parts of this except the looping part of the code.
This is my approach and I can't get it to work.
%Do i = 1 %To 12 %By 1;
call symputx ('YYYYPP',trim(YYYYPP));
RunQuery using &YYYYPP.
%Mend macro1; %macro1;
Any Help is appreciated in advance.
06-17-2016 06:45 AM
Typically, this is done via a call execute() in a data _null_ step.
But what kind of pull do you need to do?
Perhaps it could be solved in a simple SQL join?