Here is a tweak to your program to push it in the right direction:
data update1(drop= var75 -- var77);
retain varlist;
update raw(in=a) ss(in=inb);
by key date type;
updated_flag = inb; if a and last.type then output;
run;
I can't tell why you would need the RETAIN statement, but that part is up to you.
The coding change protects against having multiple updates for the same RAW observation, and outputting each change rather than all the changes after they have been applied.
The UPDATED_FLAG variable gets replaced each time. If you want to process multiple batches of updates, it is easy, but mildly more complex to track which observations have been updated by any of the batches of updates.
... View more