New SAS programming features in SAS Enterprise Guide 7.1

40

SAS Enterprise Guide 7.1 began shipping last week. Of the many new features, some are "biggies" while others are more subtle. My favorite new features are those for SAS programmers, including several items that I've heard customers ask for specifically. I'll describe them briefly here; the SAS Enterprise Guide online help contains more details.

Track program history

This is one of the biggies. If you have SAS programs in your SAS Enterprise Guide project, you can now track your changes in those programs using standard source control management methods.

eg71_commit
You can "commit", view history, revert changes, compare versions, and even see an annotated "blame" view that shows exactly when you introduced a change that broke your program.

eg71_blame
The program history feature relies on a "hyperlocal" Git repository within your EGP file, so you can't use this to track changes to SAS programs that you store outside of the project. But SAS Enterprise Guide 7.1 also supports integration with a file-system-based Git repository if you set one up using other tools. The SAS integrated menus/tools will still help you to see your program's heritage.

eg71_newscm
Why Git? Functionally, it fits the purpose. And the SAS team was able to embed the necessary pieces within the application, so you don't need to install additional tools before getting started. And besides, all of the cool kids use Git these days. If you need to work with Subversion or another tool, you can still use this file-system technique.

Smart highlighting in the program editor

Double-click on a word in the editor to highlight it, and instantly see all other occurrences of that word highlighted in your program view. That's what puts the "smart" in "smart highlighting".

It's amazingly useful for finding all occurrences of a variable name, data set name, or an embarrassing misspelling.

eg71_smarthighlight

Project log summary window

The Project Log shows you a complete aggregated view of your SAS logs within your project; it's been part of SAS Enterprise Guide for several years. The log content is comprehensive, but often difficult to navigate because it holds so much. Now the popular Log Summary view (introduced in release 6.1) has made it to the Project Log, simplifying your journey through the log content.

eg71_projlogsummary

Project-level Search

The search for a "search" feature led me to create the EGP Search tool, which has been very popular among SAS Enterprise Guide "power users". Now there is a built-in search feature that allows you to search the current project for text in any project element, including tasks, programs, and results.

eg71find

(The built-in search feature doesn't search multiple project files, so my EGP Search tool isn't obsolete just yet.)

SAS Macro Variable viewer and SAS System Options viewer

Many SAS programmers have downloaded these two custom tasks from this blog. The macro variable viewer shows all of the current SAS macro variables and their values, plus allows a quick method to evaluate macro expressions. The system options viewer shows all of the SAS options, with their values and meanings. Thanks to the popularity of the custom tasks, the R&D team agreed to include them in the main application. These tasks are now "first-class citizens" on the Tools menu.

eg71_newtools

But wait, there's more

I look forward to discussing more new features, including: integration with SAS Studio tasks, with SAS Visual Analytics and the LASR server, some new UI niceties for finding tasks and organizing Favorites, and much more. It's a big release with plenty of treasures to find -- and even I'm still discovering them!

Share

About Author

Chris Hemedinger

Senior Manager, SAS Online Communities

+Chris Hemedinger is the manager of SAS Online Communities. Since 1993, Chris has worked for SAS as an author, a software developer, an R&D manager and a consultant. Inexplicably, Chris is still coasting on the limited fame he earned as an author of SAS For Dummies.  He also hosts the SAS Tech Talk webcasts each year from SAS Global Forum, connecting viewers with smart people from SAS R&D and the impressive work that they do.

40 Comments

  1. Chris, the enhancement of EG to be able to track history is a fantastic addition. I have long wanted this "Git" type of capability.

    Ironically I had given a presentation at MWSUG just 6 days earlier regarding file backups and "roll-backs" when using earlier versions of SAS EG (The techniques in the paper will be very useful to users of prior versions of EG who won't be on version 7.1 for some time). The paper is entitled "File Management and Backup Considerations When Using SAS® Enterprise Guide (EG) Software" and is located at http://www.mwsug.org/proceedings/2014/RF/MWSUG-2014-RF05.pdf.

    As I understand it, this history will be contained within the ".egp" file. It will be ever-increasingly more important that users have a good solid backup plan for those files that they have thoroughly tested.

    For the external SAS files, can you suggest a few good programs for doing the Git histories that will work both in EG and Interactive PC SAS?

    Thanks to all members of the EG team for a job well done.

    Sincerely, Roger Muller

    • Chris Hemedinger
      Chris Hemedinger on

      Roger, thanks for the comment. I agree with you that this is a great addition! Congratulations on your MWSUG paper.

      For programs that are embedded in the EGP, the Git history is also part of the EGP file. So yes -- back up those files!

      For SAS programs outside of the EGP (represented as "shortcuts"), you can use Git tools on your local file system. I have Git Extensions + Git Bash and Git GUI installed on my local machine. When I use those tools to create a local Git repository with SAS programs in it (or clone another repo to a local area), SAS Enterprise Guide 7.1 automatically detects this and enables the Commit and History buttons in the program editor window.

      • Jan Milter Milter Ehlers on

        Hi Chris

        Are there any functionality within EG to commit the .EGP project to a local git repository? Furthermore, do you have any advice on commiting related metadata changes to git?

        • Chris Hemedinger
          Chris Hemedinger on

          Jan, there's nothing internal to EG that supports EGP version control with Git, but of course you can manage that with your file system and Git tools.

          For SAS metadata (assuming that's what you're talking about), the only related version control I know about is with SAS DI Studio, which supports SVN and CVS.

  2. Chris,

    The Project Level Search is a nice addition BUT - it would be nice to have a "FIND and REPLACE" option as well - something to add to future enhancements. I am using your SEARCH TOOL across multiple EG projects and it has been very useful to me. Much appreciated.

    Chuck Patridge

  3. One of my dreams: just like currently there is highlighting (or shading) regarding nested parentheses -- I'd love to see highlighting regarding do's and end's. It's frustrating when you have conditional and loop blocks nested 5, 6, 7 deep, and SAS reports: "unmatched end".

    Thoughts?

  4. Thanks for introducing me a new SAS programming feature and i am look forward to use this feature. Neat to see SAS Enterprise Guide 7.1 is supported on SAS 9.4, 9.3, and 9.2 too!.

  5. Do you need to have Git software installed to use the integrated source control feature of EG 7.1? Open-source software installs aren't allowed by my org.

    • Chris Hemedinger
      Chris Hemedinger on

      Megan,

      You do not need any addition Git installation for the integrated "program history" feature for programs within your project. If you want to integrate with a team repository via Git or a file-based repository on your PC, then you would need that Git software to be installed on your local system.

  6. Rich Frechette on

    Hi Chris,

    Our area just upgraded from Enterprise Guide 5.1 to 7.1. I noticed that the data grid that displays the dataset contents has a much higher row height in the newer version. I can't seem to find a place to set my preferences for this. Do you know if this is configurable and if so, how?

    Thanks,
    Rich

    • Chris Hemedinger
      Chris Hemedinger on

      Hi Rich,

      The 7.1 release received a new data grid, with a slightly different look and a few new features (like Copy with Headers!). But I'm not sure about the answer to your question. I've asked the development team, and I'll post back when I hear.

    • Chris Hemedinger
      Chris Hemedinger on

      Rich, I checked with the developers. Currently the row height is determined by the height of the default font used within the application. There isn't a direct way to adjust it; you would need to tweak your Windows display settings to adjust font size and font face in general, and then this would effect the appearance of the SAS Enterprise Guide application -- including the data grid.

      You can play with different font settings in the Windows Color and Appearance window. Shortcut: type "desk.cpl ,5" into the Windows Run field (WindowsKey + R).

  7. Pingback: Project Reviewer task and Copy Files task: refreshed for v7.1 - The SAS Dummy

  8. Sonnenfinsternis on

    Hi Chris,

    you show us a built-in search feature that allows you to search the current project for text in any project element, including tasks, programs, and results. Thats great, but I need a search over more then one project in the SAS-Programms. So in the moment I can save the Files outside and search - but when the SAS-programm is inside the project it's difficult.

    Do you have a solution?
    Thanks
    Jan

  9. Hi

    I like the editor in Enterprise guide 7.1, but there are a few features I would've liked that are not there yet (or that I haven't found). I would like to be able to the following:

    1. Collapse parts of code of my own choosing. I often have distinct parts of a program, and when working on one part, it would be great to be able to collapse the other parts. As far as I can see, I can only do this if these parts have particular constructions, like being single macros or data steps. Can I somehow collapse selected lines of code?
    2. Hide comments. While extremely useful when reading other peoples programs or revisiting an old program, I find that comments can be annoying when I'm working on a program I'm familiar with. Is it possible to view/hide comments?
    3. Have colors within macros. The color schemes makes it a lot easier to spot errors while writing code. But this tool doesn't work as well within macros. Is it possible to apply the same color schemes within macros as in open code?

    • Chris Hemedinger
      Chris Hemedinger on

      Bart, I haven't personally tried it, as I didn't have all of the pieces installed. Are you having trouble with it? You could post a question into the SAS Enterprise Guide community and I'm sure the team would provide some guidance.

  10. Odd, but for some reason in EG 7.1 when I click on my servers to the location of a dataset I want to open, and double click it, instead of it opening up the data set for viewing, it just adds it to the process flow. If I right-click the data set, in the Servers box, and select "Open," nothing happens. It's not until I either double click the data set under the process flow, or go into the process flow and click the associated data set icon on the flow view that it becomes viewable. Anyone else have this, what seems like, bug?

    • Chris Hemedinger
      Chris Hemedinger on

      Sounds like a problem with your setup -- I haven't heard of this issue before. I recommend working with SAS Technical Support on this one.

        • Dah, silly me!!! I checked "Automatically Open data when added to project" in options and it worked. I could have sworn though in previous versions I had that unchecked and could still open data sets as mentioned above. I guess I'm either thinking of the "Automatically open data or results when generated" option or the newer version of EG ties both the add to process flow and open data set together down the same path.

  11. Hi I am migrating to Enterprise guide 7.1, however I am having difficulties reading in all my formats from different directories, below is the log error
    64 %include ADpgms("0-1-formats.sas"); *Read in Analysis Datasets format statements;
    ERROR: File ANALYSIS.FORMATS.CATALOG was created for a different operating system.
    NOTE: The previous statement has been deleted.
    443
    443 ! proc format library = analysis.formats;
    ERROR: File ANALYSIS.FORMATS.CATALOG was created for a different operating system.
    443 ! run;
    WARNING: RUN statement ignored due to previous errors. Submit QUIT; to terminate the procedure.
    444 %include pgmsV1("0-1-formats.sas"); *Read in formats from the JHS visit 1 catalogue;
    ERROR: File JHSV1.V1FORMATS.CATALOG was created for a different operating system.
    NOTE: The previous statement has been deleted.
    974 + N = 'No'
    _
    22
    76
    ERROR 22-322: Syntax error, expecting one of the following: a quoted string, a numeric constant,
    a datetime constant, a missing value, ;, (, LOW, OTHER.

    ERROR 76-322: Syntax error, statement will be ignored.

    NOTE: The previous statement has been deleted.
    2297
    2297 ! proc format library = jhsV1.v1formats;
    ERROR: File JHSV1.V1FORMATS.CATALOG was created for a different operating system.
    2297 ! run;
    WARNING: RUN statement ignored due to previous errors. Submit QUIT; to terminate the procedure.
    2298 %include pgmsV2("0-1-formats.sas"); *Read in formats from the JHS visit 2 catalogue;
    ERROR: File JHSV2.V2FORMATS.CATALOG was created for a different operating system.
    NOTE: The previous statement has been deleted.
    3808
    3808 ! proc format library = jhsV2.v2formats;
    ERROR: File JHSV2.V2FORMATS.CATALOG was created for a different operating system.
    3808 ! run;
    WARNING: RUN statement ignored due to previous errors. Submit QUIT; to terminate the procedure.
    3809 %include pgmsV3("0-1-formats.sas"); *Read in formats from the JHS visit 3 catalogue;
    ERROR: File JHSV3.V3FORMATS.CATALOG was created for a different operating system.
    NOTE: The previous statement has been deleted.
    5467
    5467 ! proc format library = jhsV3.v3formats;
    ERROR: File JHSV3.V3FORMATS.CATALOG was created for a different operating system.
    5467 ! run;
    WARNING: RUN statement ignored due to previous errors. Submit QUIT; to terminate the procedure.
    5468 %include pgmsAF("0-1-formats.sas"); *Read in formats from the JHS AFU catalogue;
    5973
    5973 ! proc format library = afu.formats;
    ERROR: File AFU.FORMATS.CATALOG was created for a different operating system.
    5973 ! run;

    • Chris Hemedinger
      Chris Hemedinger on

      Hi, is it possible that you also moved your version of SAS, perhaps from 32-bit Windows to 64-bit Windows. Or maybe from Windows to a UNIX/Linux system? SAS Catalog formats are not portable across different platforms. You might need to recompile your SAS format definitions for your new SAS platform.

  12. EG 7.1 looks like some really neat stuff -- stuff that I'd love to get my hands on. I'm now at a company that is still using EG 4.3. The brontosaurus steaks are pretty good, but that version of EG? Not so much.

    ABORT CANCEL makes 4.3 hang. If you have multiple windows open, EG can get confused, and you can't save your code. I've seen an EGP get corrupted as a result.

    I miss the "good old days" of EG 5.1 at my last shop.

    • Chris Hemedinger
      Chris Hemedinger on

      ABORT CANCEL can make the SAS Workspace go away (ending the SAS session) -- although it's supposed to cancel only the currently running code. These operations have been refined in later versions of SAS and EG, so I can see where EG 4.3 might have a problem. EG 7.1 works with SAS all the way back to SAS 9.2, so there is little risk in upgrading. But I do appreciate the struggle of working in a tightly controlled IT environment; change is slow.

  13. Pingback: Уже вышел SAS Visual Analytics 7.1, а также EG 7.1 | SAS-Education

  14. Pingback: Video: Demonstrating the new features in SAS Enterprise Guide 7.1 - The SAS Dummy

  15. Pingback: How to compare SAS programs in SAS Enterprise Guide - The SAS Dummy

  16. Pingback: Ten SAS Enterprise Guide program editor tricks - The SAS Dummy

  17. Craig Dormire on

    Is there any way to export the Commit/History? The new functionality is fantastic, but we need a way to pull the change history out of EG to share archive and share with internal audit who do not have EG access. Currently we use Microsoft Word to compare 2 code versions, which seems painfully antiquated now that this new EG functionality exists, but we have to have a way to get the change log out of EG. Thanks for any help you can give!

    • Chris Hemedinger
      Chris Hemedinger on

      I don't think you can export the history when using the built-in Git features that are embedded in the EG project file. For best auditing, I recommend storing your programs outside of the project and maintain them in an external Git repo. Then changes can be tracked outside with any number of tools.

Leave A Reply

Back to Top