- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
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.
- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
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
- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
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
- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
If your SAS system runs on UNIX, the diff command will be your friend.
- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
+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.
- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
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.
- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
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.
- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
One advantage to using a programming editor is that some of them will allow you to skip comments and blank lines in the comparisons.
- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
You can also now compare two SAS programs within SAS Enterprise Guide -- new in v7.1:
How to compare SAS programs in SAS Enterprise Guide
Chris