@SASPhile wrote:
Is there a way to send proc compare results to a file (.txt) and append the results to the same file?
I'm not quite sure what you mean by "append results to the same file".
Proc Printto can be used to send output to a file that typically goes to the results or listing output. By default output is appended as additional procedures are run.
If you have other procedures that you do not want in the same output you can suspend output to the file and then restart later.
Pseudo code:
Proc printto print="filename"
new;
run;
proc compare base=<baseset> compare=<compareset>;
run;
proc printto;
run;
<other procedures>
Proc printto print="filename"
;
run;
proc compare base=<baseset2> compare=<compareset2>;
run;
proc printto;
run;
If you don't have other procedures in the middle of the ones you want to send to text file then you only need to have the Proc Printto;run; after the last to close the output. Notice that NEW creates a new file and will replace an existing one if used.