Dear all,
I'm just wondering if there is a way which I can compare two SAS programs if they are exactly the same?
Hope this is not a silly question to ask.
Thanks in advance.
SAS programs are text files so you can use any text editor comparison tools to do this, even Word will compare docs I believe.
Diff Checker - Online diff tool to compare text to find the difference between two text files
If you know Eclipse - a Java Develop tool, there is a built-in program compare tool. Ctr+ left mouse and select these two code , right mouse and select compare
If your SAS system runs on UNIX, the diff command will be your friend.
+1 to all the above. To add, there is a simple website for this: http://www.comparemyfiles.com/
Or if you are using version control then there are usually compare tools embedded - Diff with previous version in SVN/TortoiseSVN for instance.
Hi K C Wong
it is very easy task to do.
1) you need export this both code as a Text format.
2) then you by using proc import import both code in SASDATA set.
3) then you can simply use.
proc compare base = dataset1 compare= dataset2 ;
run;
then you you will be get your answer if code is matching of not..
🙂
please let me know this answer help full or not.
Thanks everyone for your valuable contribution
i shall try them all next time.
In the mean time, I'm using MsWord to do the comparison.
One advantage to using a programming editor is that some of them will allow you to skip comments and blank lines in the comparisons.
You can also now compare two SAS programs within SAS Enterprise Guide -- new in v7.1:
Chris
Are you ready for the spotlight? We're accepting content ideas for SAS Innovate 2025 to be held May 6-9 in Orlando, FL. The call is open until September 25. Read more here about why you should contribute and what is in it for you!
Learn how use the CAT functions in SAS to join values from multiple variables into a single value.
Find more tutorials on the SAS Users YouTube channel.