• Print  |
  • Feedback  |

Knowledge Base

More on this Topic

Feedback

SAS Custom Task Examples

"Ready to Run" Examples and Source Code for Custom Tasks for SAS Enterprise Guide using Microsoft .NET

Use the following links to access the example projects that were developed for Custom Tasks for SAS Enterprise Guide using Microsoft .NET, by Chris Hemedinger.

About the Examples

The book includes detailed descriptions about several custom task projects. These projects are provided by the author for your use in two ways:

Disclaimer: This material is provided "as is" by SAS Institute Inc. There are no warranties, expressed or implied, as to merchantability or fitness for a particular purpose regarding the materials or code contained herein. The Institute is not responsible for errors in this material as it now exists or will exist, nor does the Institute provide technical support for it.

Name Chapter Source links
Example tasks Chapter 1: Why Custom Tasks?
For use in "Exercise: Download, Deploy, and Access Custom Tasks from SAS"
binaries
Task Lifecycle Chapter 4: Meet the APIs binaries
source
Top N Report Chapter 9: The Top N Report binaries (C#) binaries (VB)
source (C#)
source (VB)
SAS Task Property Viewer Chapter 10: For the Workbench: A SAS Task Property Viewer binaries (C#)
binaries (VB)
source (C#)
source (VB)
Calculate Running Totals Chapter 11: Calculating Running Totals binaries (C#)
binaries (VB)
source (C#)
source (VB)
Data Set to DATA Step Chapter 12: Abracadabra: Turn Your Data into a SAS Program binaries
source
Compress SAS Data Set Chapter 13: Putting the Squeeze on Your SAS Data Sets binaries
source
System Commands Chapter 14: Take Command with System Commands binaries (C#)
binaries (VB)
source (C#)
source (VB)
PROCs on Facebook Friends Chapter 15: Running PROCs on Your Facebook Friends binaries
source
Catalog Explorer Chapter 16: Building a SAS Catalog Explorer binaries
source
SAS Macro Variable Viewer
SAS Options Viewer
Chapter 17: Building a SAS Macro Variable Viewer and SAS System Options Viewer binaries
source
Sudoku Solver Bonus example (not in the book). Using SAS to solve a Sudoku puzzle! binaries
source
SasData Class Example Bonus example (not in the book). This example shows how to use object-oriented classes to access the SAS Workspace, libraries, and data. binaries
source

Special steps for running task examples

Recent versions of SAS Enterprise Guide (version 5.1 and later) use Microsoft .NET 4.0, which enforces additional security requirements before running custom task DLLs that you download from the Web. Because these task DLLs are downloaded from the Internet, the Microsoft .NET runtime does not automatically "trust" them as it would trust a properly installed application. To enable the task to run, you must first "unblock" the file using Windows Explorer.

  1. Using Windows Explorer, browse to the assembly (DLL) that you downloaded from the samples and extracted from the Zip file.
  2. Right-click on the DLL file, and from the shortcut menu, select Properties. The Properties dialog box opens.
  3. On the General tab, click Unblock to indicate that this DLL is trusted (Note: the Unblock button will not appear if the assembly is already unblocked and available.)
  4. Click OK to close the Properties dialog box.

You can read more about this security feature and behavior in this Microsoft Knowledge Base article. If you build the examples yourself, using the supplied projects and source code in Microsoft Visual Studio, you will not need to unblock the DLLs as you build them.

Questions or Comments

Questions or comments concerning this material may be sent to the author at this address:

SAS Institute Inc.
SAS Press
Attn: Chris Hemedinger
SAS Campus Drive
Cary, NC 27513

Or you can send email to: saspress@sas.com. Use "Comments for Chris Hemedinger" for the subject field.