Custom tasks for SAS Enterprise Guide: Q&A

14

Last week I delivered a SAS Talks session: Introduction to Custom Tasks for SAS Enterprise Guide (click to watch it). I promised that I would share a collection of resources where you can learn more information.

First, here is a round-up of the custom tasks that I mentioned, with links for more information and downloading. These are tasks that you can use today in SAS Enterprise Guide.

Copy Files to/from SAS Project Reviewer
SAS Macro Variable Viewer SAS System Options Viewer
Export Data to Excel 2010 (xlsx) Data Set->DATA Step
Run System Command PROCs on Facebook Friends
SAS Catalog Explorer Sudoku Solver with SAS
Top N Report Calculate Running Totals
Compress SAS Data Create KPI Report
Report with Conditional Highlighting Run ODS Graphics Designer

Now, a few selections from the Q&A section of the talk.

Does my SAS license allow me to run custom tasks?
Yes, there are no license restrictions for running custom tasks (as long as you have SAS Enterprise Guide and/or the SAS Add-In for Microsoft Office). However, the work that the task performs might leverage a SAS capability that you don't have. For example, if you found a custom task that created a forecast using PROC ESM, you would need SAS/ETS in order to benefit from that task.

Note: the SAS OnDemand for Professionals and SAS OnDemand for Academics offerings use special versions of SAS Enterprise Guide in a SAS learning environment. Custom tasks are not usable in that environment.

Do I have to register a custom task in SAS Management Console before I can use it (or give it to my team to use)?
You need to register a custom task in SAS Management Console only if you want to limit who has access to it. By default, any SAS Enterprise Guide user can install and run a custom task simply by "installing" the custom task DLL(s) to one of several designated local folders.

I'm running an older version of SAS Enterprise Guide. Can I still use the custom tasks that you described during your talk?
The answer is: it depends. Some of the tasks I showed (such as the Top N Report and the Soduko Solver) are designed to work with SAS Enterprise Guide 4.1, and they work in all later versions of SAS Enterprise Guide as well. Other tasks (such as Project Reviewer) were built for SAS Enterprise Guide 4.3, and still work with version 5.1. See the documentation that accompanies the task for which versions of the software are supported.

Can you describe the difference between SAS stored processes and custom tasks?
A SAS stored process is a SAS program that is stored in a central location, registered in the SAS Metadata environment. You can run a stored process in SAS Enterprise Guide, SAS Add-In for Microsoft Office, in web apps like SAS Web Report Studio and even SAS Visual Analytics. But as a stored process author, you have limited control over the prompts and user interface experience. A custom task runs only in SAS Enterprise Guide and the SAS Add-In for Microsoft Office. Custom tasks can run SAS programs (like a stored process) but they can be used for many other operations that aren't necessarily captured in a SAS program. And, as a custom task author, you have complete control over the user interface.

For a summary of the differences between custom tasks, stored processes, and other methods of packaging custom processes, see Chapter 1: Why Custom Tasks. It's the free chapter from Custom Tasks for SAS Enterprise Guide Using Microsoft .NET.

What's the best way to get started with building my own custom task?
It's definitely easier to use a custom task than it is to build one. But building tasks can be a fun and rewarding experience too. To get started, my shameless advice is to begin with my book: Custom Tasks for SAS Enterprise Guide Using Microsoft .NET. The information in the book will save you loads of time in research, and should provide you with just the right amount of information to get started.

Of course, you can also visit go.sas.com/customtasksapi for the "raw" information about the custom task APIs and lots of example projects.

If you missed the talk and you still want to learn about how custom tasks can help you to do more with SAS, go watch the recording right now!

Share

About Author

Chris Hemedinger

Director, SAS User Engagement

+Chris Hemedinger is the Director of SAS User Engagement, which includes our SAS Communities and SAS User Groups. 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

14 Comments

  1. Hi Chris,

    Just ordered your book Custom Tasks for SAS Enterprise Guide Using Microsoft .NET, and I'm looking forward to it.

    Question, from within a custom task is there a way to hook up the active project to a EG scripting project (ISASEGProject).?

    Thanks, Ken

    • Chris Hemedinger
      Chris Hemedinger on

      Ken, thanks for ordering the book!

      To answer your question: no, there is not. The automation model (in SAS.EG.Scripting) is separate from the custom tasks API, and there isn't a supported way to translate the objects from one to the other.

      That being said, I have seen customers go "spelunking" into this and getting some interesting mashups working. However, it's not a scenario that SAS can officially support, as it goes off the documented path for application integration and is always subject to change between releases.

      • Dang, I was afraid of that as I couldn't find anything, it would be helpful though. Well, off I go then into the undocumented path, won't be the first time. Any idea what EG is developed in?

        Thanks for your quick reply Chris.

        • Chris Hemedinger
          Chris Hemedinger on

          Ken, SAS Enterprise Guide is a .NET application. It's written in C#, but you can write custom tasks or automation drivers in C# or Visual Basic.

  2. Pingback: Special steps for installing the custom tasks that you download - The SAS Dummy

  3. Is there a custom task that can open a pop-up box that will tell the user to run a particular process flow in the SAS EG?

    • Chris Hemedinger
      Chris Hemedinger on

      Hugh, I'm not aware of one that exists right now, but I don't think it would be difficult to built one. Perhaps I'll try to work up an example.

  4. Hello Chris,

    Just got your book Custom Tasks for SAS Enterprise Guide Using Microsoft .NET and wondering if you have tested to build custom tasks in C# using the latest Visual Studio 2013 (is the template still working, etc.).

    Thanks,
    Eric

  5. Hi Chris,
    I read SAS paper "How to Create a SAS® Enterprise Guide® Custom Task to Get Data from a SharePoint List into a SAS® Data Set" , I downloaded 'dll' file and tried to read data from SharePoint, but somehow the dataset is having xml tags and wrong values for many of the rows. Could you please help me with this?

    Thanks
    Vineeta

  6. Randy Collica on

    Hi Chris, do you happen to have a blog or video of making a custom task in SAS Studio for Viya?

Back to Top