11 super-useful custom tasks for SAS Enterprise Guide

10

The holiday season is here, and you're probably wondering how to shop for that picky SAS Enterprise Guide user on your gift list. I've got a few ideas for you, and the price is right! Here are links to 11 custom tasks that are free to download, easy to install, and so useful that even the most finicky SAS user will soon find them indispensable.

For programmers - 3 tasks

SAS Enterprise Guide has a great program editor, but its missing some of the utility windows that SAS programmers are accustomed to. These tasks provide those windows, and more, in a way that fits in to your flow.

SAS Catalog Explorer
Need a quick way to check the contents of your SAS catalogs? This task allows you to see your catalog contents, including your compiled macros, SAS formats, SOURCE entries, and more.
Download: See this blog post for more information and download link.

SAS System Options Viewer
Just like the OPTIONS window in traditional SAS, but better! This window shows all of the SAS system options and their current values, plus information about how the values were set. It also provides a filter field for easy searching.
Download: See this blog post for more information and download link.

Macro Variable Viewer
This one is unique to SAS Enterprise Guide. See the values for all automatic and global SAS macro variables in your session. It provides a simple "immediate evaluation" window that allows you to test any valid macro expression. Like the options window, there's also an easy way to filter the view to just the variables you want.
Download: See this blog post for more information and download link.

For project people - 2 tasks

Feeling introspective? These tasks allow you see what's inside your SAS Enterprise Guide project.

Project Reviewer
This task provides a listing of each task in your project and process flows. You can see how long each task took to run, as well as the time for each process flow. You can even use this task to build a "project report" right into your project. (That's so meta!)
Download: See this blog post for more information and download link.

Task Property Viewer
This task shows you the "guts" of the other tasks within your project. Each task has saved settings that control how it will behave when you run it, and the Task Property Viewer provides you a glimpse into those settings. This task is a must-have for any developer who is building a custom task, since it shows you exactly what you're saving into the project. It's a powerful debugging tool.
Download: This task is supplied as support material for Chapter 10 of my book, Custom Tasks for SAS Enterprise Guide using Microsoft .NET. You can download it as a sample project from the book's examples page.

For command and control - 3 tasks

Sometimes you need SAS Enterprise Guide to do work that isn't captured in a SAS program. These tasks allow you to capture special custom activities into your process flow.

Copy Files to/from SAS Session
Need to move files from here to there? If you need to copy files (FTP style) among your PC and the SAS server, this task captures that step. Use wildcards and SAS macro variables to specify which files to move to where. (This is one of the most popular custom tasks.)
Download: See this blog post for more information and download link.

Message Prompt
If you need to pop a message in the middle of your process flow, this is the task for you. It offers a few options to capture a simple response from the user, so you can use this to ask a Yes/No question, solicit a simple text value or ask for a password.
Download: See this blog post for more information and download link.

System Command
If you need the ability to run a local Windows command during your process flow, this task does the trick. Supply the commands the way you might craft a Windows BAT file. (Remember how to do that?)
Download: See this blog post for more information and download link.

For working with data - 3 tasks

These tasks provide handy data-centric utilities, helping you to do more with your SAS data.

DATA Step from Data Set
This task reverse-engineers a data set into a SAS program -- using the SAS DATA step. It creates a data set header with all of your column metadata, and then includes all of your data records in DATALINES.
Download: See this blog post for more information and download link.

Compress SAS Data
Are your data sets hogging up too much disk space? This Compress task applies two techniques to make your data smaller. First, it analyzes your text fields and optimizes the allocated field length to just what you need. Next, you can optionally use the COMPRESS feature of the SAS data set to let SAS compress your data set file.
Download: See this blog post for more information and download link.

Calculate Data Cardinalities
This task shows you how many levels (distinct values) each of your data columns contains. This is an important step towards understanding your data so that you know what types of analyses are appropriate for each of your data columns.
Download: See this blog post for more information and download link.

There -- that list goes to 11. That should be enough, but I can't resist adding just two more tasks as a bonus feature!

Bonus tasks - 2 more for fun

All of the tasks mentioned so far are useful and fun in their own way, if you get a kick out of that sort of thing. Here are a couple of bonus tasks designed especially for fun.

Solve your Sudoku
This was one of my first example custom tasks, built back in 2007. Still works great!
Download: See the examples page for my book -- look in the BONUS area..

Run PROCs on your Facebook Friends
I've had a lot of fun with this one -- and you can too. Get new insight on your Facebook friend connections!
Download: See this blog post for more information and download link.

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

10 Comments

  1. Chris, thanks for all the the great tools. Just in time, a student asked during training, whether there is a simple way to look at the contents of a SAS Catalog without writing code and here we go.

  2. The Data Set --> DATA Step is (for me) the most useful task ever written, anywhere, for anything. Perhaps I exaggerate a little, but I use it all the time. Thanks for sharing some more that I can try!

  3. These are very interesting tools, I would like to know if or when these tools would be available for EG 6.1

    Thanks!

    • Chris Hemedinger
      Chris Hemedinger on

      Laurent,

      All of these tasks should work with EG 6.1 already. Give them a try and let me know how they work for you!

  4. Pingback: Using Microsoft Visual Studio 2013 Express to debug custom tasks - The SAS Dummy

  5. Pingback: New course: Developing Custom Tasks for SAS Enterprise Guide - The SAS Dummy

  6. Chris,
    I tried "Copy Files to/from SAS Session" task and it was awesome. I was able to impress my Boss with it. Thanks much & Thumbs Up!!
    I was wondering if I can modify/customize it to take the input file from my local machine and convert it into a dataset and post that dataset on the server.

    • Chris Hemedinger
      Chris Hemedinger on

      I'm glad you're boss was impressed! I consider it my job to make you look good :)

      The process you're describing -- take an input file (such as a text/CSV/Excel file), move it to the server and convert to a SAS data set -- that's exactly what the File->Import Data task does for you. Can you leverage that with your file?

Back to Top