@alepage wrote:
I have tested my code and I have found that for the else condition, an output statement is fine. But for the if condition, I do not need to replace the dataset but to append the data generated. So my question is how do we do that. How do we convert the condtion
if inlist and inbase then output dest2.&filename._Anonym;
if inlist and inbase then
do;
proc append base=dest2.&filename._Anonym; data= what do we put here;
run;
You cannot put a PROC inside a DATA step. I already provided an earlier post in this thread explaining what to do instead.
This whole thread is the XY Problem. You have a "solution" that requires you to put PROC APPEND into a DATA step, but you are having trouble doing it. You haven't told us the problem that this allegedly solves, and it would be extremely helpful if you backed up and explain the entire problem you are trying to solve, rather than focusing on your solution of putting a PROC into a DATA step. Please note that backing up and explain the entire problem, rather than focusing on your desired solution, is a far superior approach that can produce much better solutions, involving less code and less confusion.
So if we're going to move forward, we first have to move backward and understand what the problem is that you are trying to solve with a PROC in a DATA step.
... View more