Custom tasks for SAS Enterprise Guide: Q&A

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!

tags: SAS custom tasks, sas talks

8 Comments

  1. Ken Peckham
    Posted April 24, 2013 at 3:48 pm | Permalink

    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
      Posted April 24, 2013 at 3:55 pm | Permalink

      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.

      • Ken Peckham
        Posted April 24, 2013 at 5:31 pm | Permalink

        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
          Posted April 26, 2013 at 11:49 am | Permalink

          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. Hugh Shinn
    Posted August 12, 2013 at 4:49 pm | Permalink

    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
      Posted August 13, 2013 at 8:41 am | Permalink

      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.

  3. Eric Sun
    Posted November 14, 2013 at 9:11 am | Permalink

    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

    • Chris Hemedinger Chris Hemedinger
      Posted November 14, 2013 at 9:14 am | Permalink

      Eric,

      Great timing. Yes! I just installed VS2013 and tested. I also updated the templates to work a bit smoother for EG 4.3 and later. Download them from http://go.sas.com/customtasksapi and let me know how they work for you.

One Trackback

  1. [...] Custom tasks for SAS Enterprise Guide: Q & A Introduction to SAS Custom Tasks [SAS Talks webinar] Custom Tasks for SAS Enterprise Guide using Microsoft .NET tags: .net, SAS custom tasks Bookmark on Delicious Digg this post Recommend on Facebook Share on FriendFeed Share on Linkedin share via Reddit Share with Stumblers Tweet about it Share on xing Print for later Tell a friend « An FTP-style task in SAS Enterprise Guide: user-driven fixes [...]

Post a Comment

Your email is never published nor shared. Required fields are marked *

*
*

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <p> <pre lang="" line="" escaped=""> <q cite=""> <strike> <strong>