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
Don't miss out on SAS Innovate - Register now for the FREE Livestream!
Can't make it to Vegas? No problem! Watch our general sessions LIVE or on-demand starting April 17th. Hear from SAS execs, best-selling author Adam Grant, Hot Ones host Sean Evans, top tech journalist Kara Swisher, AI expert Cassie Kozyrkov, and the mind-blowing dance crew iLuminate! Plus, get access to over 20 breakout sessions.
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.