Hi all SAS Users,
Yesterday I got the answer about installing WinMerge from @ChrisNZ by reading a paper from @ChrisHemedinger to compare two SAS code together.
1. I am wondering why I cannot save the SAS code after adjusting in WinMerge. For example, I have two programs name delete1 and delete2
I used the WinMerge to compare them
2. It turns on this notice and I am not sure what I should do with that (Could you please confirm to me that I just need to click onto "Don't ask this question again" and Yes button ?)
3. Assuming I click"Yes", it compares successfully
So, I try to copy the "different line" from delete2 to delete1 to let them be identical by using the function Right Click -> "Copy to right".
Then I click the button "Save" at the top left of the dashboard with a purpose of saving the adjusted delete1
However, when I come back to SAS EG, no change applied
I am wondering could you please let me know how to save an adjusted program from WinMerge.
Apart from that, I also want to report a change for this document that
In SAS EG 8.3 it becomes
Warm regards and have a great day.
Phil
SAS programs can be tracked in your EG projects two ways:
When using external files, you can use the programs in your project but it's possible to also edit/modify the file with other tools (like WinMerge).
The visual cue is subtle, but the icons are slightly different for embedded vs. external programs:
And when you hover your cursor over an external program node, you'll see the file name listed in a tool tip.
To accomplish what you want, I recommend keeping the program files external in a folder. Open them in EG and add to your project. Then select the two nodes, right-click, select Compare. If you copy content from one WinMerge pane to another and then save, EG should detect the file update to the underlying file.
a. Notification.
Your files were created on Unix/Linux and Windows respectively. See here for historical reasons for the frustrating difference. https://stackoverflow.com/questions/419291/historical-reason-behind-different-line-ending-at-differe...
b. Winmerge should update the files. Does it? Is it EG that fails to refresh correctly?
Hi @ChrisNZ
Thank you for your reply.
a. But I just created these two files in the same project in the same computer, so I am wondering how come they came from Unix/Linux and Windows respectively. It is quite strange to me.
b. Yes, I did save as I mentioned and there is nothing change in the program in SAS EG, I may fall in a fallacy here, could you please hint me out?
Warm regards.
I think the challenge is that you are using embedded SAS programs, which are not files that are managed outside of your project.
The Compare feature will create a temp version of the file(s) to compare in WinMerge, but any changes you make are not reflected back into the copy you have in the project.
To make this work the way you want, you would need these SAS programs to be in files outside of the project file. Remember that you can use the "relative file path" attribute on a project to keep everything together, where your EG project can find those program files that are stored in the same folder relative to the EGP file.
You can find this setting in Properties for your project:
Thank you for your suggestion,m but I use SAS EG 8.3, but when I open the property for a program in a project in SAS EG, I got this box, which does noit have the same function like yours
And I right click on the project instead of the program, I have
Could you please help me to sort it out?
Warm regards.
The properties you want are on the Project name, which you find in the Project view. Example:
Thank you for your dedicated guide, can I aks how could I do that
"you would need these SAS programs to be in files outside of the project file"
I extract them already, now how can I compare if I do not put them into one project to compare ?
Warm regards.
SAS programs can be tracked in your EG projects two ways:
When using external files, you can use the programs in your project but it's possible to also edit/modify the file with other tools (like WinMerge).
The visual cue is subtle, but the icons are slightly different for embedded vs. external programs:
And when you hover your cursor over an external program node, you'll see the file name listed in a tool tip.
To accomplish what you want, I recommend keeping the program files external in a folder. Open them in EG and add to your project. Then select the two nodes, right-click, select Compare. If you copy content from one WinMerge pane to another and then save, EG should detect the file update to the underlying file.
SAS Innovate 2025 is scheduled for May 6-9 in Orlando, FL. Sign up to be first to learn about the agenda and registration!
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.
Ready to level-up your skills? Choose your own adventure.