How to update/refresh script file?
This might be an XY problem: What I really want is to use VIM-keybindings in SAS, but this will probably never be possible (in interactive mode). The next best thing is to use any other editor than the SAS editor, for example Sublime/Atom/Vim.
The following is a possible workaround: Have the sas-program opened in both the SAS editor and for example the Sublime-editor. Edit the program in Sublime, save file in sublime, go to SAS and refresh/update the file, and then run a selection of the program.
This, however, requires that SAS is able to refresh the program file. Is this possible? Further, I prefer that the cursor position is retained in the refreshed program.
Sublime can refresh and thus reload any changes made in SAS, but I don't know how to get SAS to reload any changes made in Sublime.
Platform: SAS Base 9.3 on Windows 7.
You can define keyboard macros in the SAS enhanced editor. This might make it unnecessary to use an external editor.
Yes, the enhanced editor was only enhanced back in V8 days, so it is old and not a good as pretty much any other ide out there. If you want to use third party editors, depending on your install you could run directly through the editor of your choice, batch mode for instance. There is no "refresh" in the SAS editor, you would need to re-load the file. This is probably why most still use the embedded editor. It would however be great to move out to a more plugin orientated approach, i.e. here is a plugin for your chosen IDE, but I don't see that happening. As @Kurt_Bremser stated there are keyboard macros, and also something called abbreviations, but even things such as code completion and such like are not present.
Any IDE for code writers should take its cues from tools like the venerable Turbo Pascal IDE, that put your cursor on the offending source code when you had a syntax error during compiling or a runtime error. Compared to that, SAS IDE's are really lacking.
If you are using SAS Enterprise Guide and you modify the code outside of SAS, the editor in SAS Enterprise Guide will show you this:
My SAS Enterprise Guide version: 7.13 HF5 (7.100.3.5486) (32-bit)
I do not know with wich version this was introduced.
Hi. thank you.
I use the EG 7.1.
Sometime SAS Enterprise Guide will show this. But sometime SAS Enterprise Guide will not show this. Is there any ways to let SAS EG show this everytime when I modify the code outside of SAS? Thank you so much.
Works for me every single time. My EG Version: 7.15 HF3 (7.100.5.6132) (32-bit).
The update does not pop up every time for me either. Can't tell what internal SAS EG logical rules govern the pop-up. Seems like the program that receives the external edit needs to be open or needs to be changed internally without a save. Otherwise, not all linked external SAS programs in an SAS EG project receive pop-up notifications.
Our SAS EG Projects contain hundreds of linked external SAS programs. They get used in stages: create datasets, run analyses, create reports, etc. Only a small portion of the linked external SAS Programs get used at any given time depending on the stage of the project. It makes sense that external edits are not flagged if they are done to the programs that have not been opened in the current SAS EG session.
I would like to have a thorough documentation on the logic of the pop-up appearance.
Thanks SAS,
I too would love to know if there is a way to configure the behavior of this popup as well as editor refreshing. I'm on EG 7.12 (7.100.2.3350) (64-bit). Can't find any settings through the GUI.
The "notification of external file changes" feature was initially added in EG 7.11 and has had some subsequent improvements since then.
Note: The feature works slightly differently depending on where your external file is stored, since it relies on the ability to detect a change in the last modified date of the external file. When the external file is stored on (or in a location accessible by) the client file system, EG normally gets immediate notification of changes to the last modified date (via a file watcher), thus is immediately able to display the "file change notification" to the user. However, when the external file is stored on a SAS server, EG does not get notified of changes to the last modified date. Rather, EG has to explicitly re-check the last modified date, which it does when it receives focus and the external file is open in an editor. This means the user will not get immediate notification if the external file is stored on the SAS server, but they should get notified when they "come back" or perform another operation. (You will only get notification if the file that changes outside of EG is currently open in an editor inside of EG, which is by design and expected.)
Here is a related post (and link to paper) that talks about how you can use an alternative/preferred editor for writing your SAS code, then return to EG for submitting and organizing:
Casey
Register today and join us virtually on June 16!
sasglobalforum.com | #SASGF
View now: on-demand content for SAS users
I realize this is a very old, perhaps dead thread, but how about just do a one-line %INCLUDE to your .sas code file in the editor and run that? That would let you use whatever IDE you want.
Registration is now open for SAS Innovate 2025 , our biggest and most exciting global event of the year! Join us in Orlando, FL, May 6-9.
Sign up by Dec. 31 to get the 2024 rate of just $495.
Register now!
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.