O'Reilly logo

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Custom Tasks for SAS Enterprise Guide Using Microsoft .NET

Book Description

Takes readers step-by-step through the process of creating custom tasks for use in SAS Enterprise Guide and SAS Add-In for Microsoft Office. Using standard off-the-shelf development tools for Microsoft .NET, you'll learn how you can hook in your custom processes and make them available to a wide range of SAS users.

Table of Contents

  1. Cover Page
  2. Title Page
  3. Copyright Page
  4. Contents
  5. About this Book
  6. About the Author
  7. Acknowledgments
  8. Chapter 1: Why Custom Tasks
    1. Why Isn't Everything Built in for Me?
    2. Options for Custom Processes in SAS Enterprise Guide
      1. What Can I Do with Custom Tasks?
      2. Who Uses Custom Tasks Today and What do they Use them For?
    3. Deploying Custom Tasks
      1. Method 1: Drop-In Deployment
      2. Method 2: Add-In Manager
      3. Accessing Custom Tasks from the Menu
      4. Common Questions about Task Deployment
    4. Accessing Ready-to-Use Example Tasks and Source Code
      1. Exercise: Download, Deploy, and Access Custom Tasks from SAS
    5. Chapter Summary
  9. Chapter 2: Tools of the Trade
    1. Introduction to the Microsoft .NET Framework
      1. Which Language is Right for You?
    2. Introduction to Microsoft Visual Studio
      1. Selecting a Version of Microsoft Visual Studio
    3. Other Tools to Make you More Productive
    4. Learning to be a .NET Programmer
      1. Resources for the New .NET Programmer
      2. Build or Buy: Using Third-Party Components
    5. Chapter Summary
  10. Chapter 3: Creating Custom Task Projects in Microsoft Visual Studio
    1. Overview of the Process
      1. Getting the Project Templates for Microsoft Visual Studio
    2. Creating New Custom Tasks Using Project Templates
      1. Using Microsoft Visual Studio 2010 or 2008
      2. Creating a Custom Task Project Using Microsoft Visual Studio 2003
    3. Chapter Summary
  11. Chapter 4: Meet the Custom Task APIs
    1. About Interfaces
    2. Meet the Interfaces
    3. Understanding the Life Cycles of your Task
    4. Special Interfaces for Special Tasks
    5. More Interfaces that Play Nice
    6. Chapter Summary
  12. Chapter 5: Meet the Task Toolkit
    1. Task Toolkit: What's in it?
      1. The SasTask Class
      2. The SasServer Class and SAS.Tasks.Toolkit.Data Namespace
      3. The SAS.Tasks.Toolkit.SasSubmitter Class
      4. The SAS.Tasks.Toolkit.Helpers Namespace
      5. The SAS.Tasks.Toolkit.Controls Namespace
      6. Examples of Using the SAS.Tasks.Toolkit Classes
    2. Chapter Summary
  13. Chapter 6: Your First Custom Task Using Visual Basic
    1. Your First Custom Task Using Visual Basic Express
      1. Creating the Project
      2. Turning the Visual Basic Class into a Custom Task
      3. Build, Deploy, and Test
      4. Adding a User Interface
      5. Saving and Restoring Task Settings
    2. Chapter Summary
  14. Chapter 7: Your First Custom Task Using C#
    1. Your First Custom Task Using Visual C# Express
      1. Creating the Project
      2. Turning the C# Class into a Custom Task
      3. Build, Deploy, and Test
      4. Saving and Restoring Task Settings
    2. Chapter Summary
  15. Chapter 8: Debugging Techniques: Yes, You will Need Them
    1. Best Practices for Making your Software Debuggable
      1. Take Advantage of Object-Oriented Design
      2. Consider Unit Testing
      3. Catch and Handle Exceptions
      4. Use Logging to Record Events and Progress
    2. Debug with Microsoft Visual Studio
      1. Debugging Basics: Some Definitions
      2. Prepare to Debug a Custom Task
      3. How to Attach a Debugger to a Custom Task
      4. Example: Debugging a Custom Task
    3. Chapter Summary
  16. Chapter 9: The Top N Report
    1. About This Example
      1. Example Source Files and Information
    2. Step 1: Exploring the Problem
    3. Step 2: Creating the SAS Program
    4. Step 3: Creating the Custom Task
    5. Examining the Top N Report Solution
    6. Chapter Summary
  17. Chapter 10: For the Workbench: A SAS Task Property Viewer
    1. About This Example
      1. Example Source Files and Information
    2. What's in your Project?
      1. Displaying Properties in a Simple User Interface
      2. Accessing Properties Using the ISASProject APIs
      3. More Possibilities with SAS Enterprise Guide Projects
    3. Chapter Summary
  18. Chapter 11: Calculating Running Totals
    1. About This Example
      1. Example Source Files and Information
    2. Designing the Task Features
      1. Assumptions: They are Necessary
      2. Scenario 1: Calculate the Running Total for One Measure across All Rows
      3. Scenario 2: Calculate Running Totals across Groups
    3. Designing the User Interface
      1. Assembling the User Interface
      2. Hooking the Controls to Data and Events
    4. Saving User Selections
      1. Using LINQ to Create XML
      2. Using LINQ to Read XML
    5. Generating a Correct SAS Program
      1. Creating a Readable Program Header
      2. Applying the Task-Specific Filter
      3. Wrap Your Variable Names Appropriately
    6. Chapter Summary
  19. Chapter 12: The Top N Report
    1. About This Example
      1. Example Source Files and Information
    2. Dissecting a SAS Data Set
    3. Using .NET to Read Data from SAS Data Sets
    4. Creating an Elegant Task Flow
    5. Adding the SAS Enhanced Editor to a Windows Form
    6. Using ISASTaskExecution to Take Matters into your Own Hands
    7. Cancel: Support is Optional
    8. ResultCount: How many Results?
    9. Run, Task, Run!
    10. Chapter Summary
  20. Chapter 13: Putting the Squeeze on your SAS Data Sets
    1. About This Task
      1. Example Source Files and Information
    2. Adapting the Sample
      1. Refactoring a Macro
      2. Compressing the Data Even Further
      3. See How you Did: Adding Reporting
    3. Wrapping the Sample in a Task
      1. Designing a User Interface
      2. Modeling the Options in a .NET Class
      3. Putting It All Together: Running and Repeating the Task
    4. Chapter Summary
  21. Chapter 14: Take Command with System Commands
    1. About This Task
      1. Example Source Files and Information
    2. Building a Task that Runs Commands
      1. The Structure of this Task
      2. Implementing a Task with ISASTaskExecution
    3. Chapter Summary
  22. Chapter 15: Running PROCs on your Facebook Friends
    1. Facebook to SAS: The Approach
      1. Example Source Files and Information
    2. Gathering Data from Facebook
      1. Example of Transforming JSON to DATA Step Statements
    3. Analyzing Data from Facebook
      1. Preparing Data for Reporting
      2. Creating Reports that Provide Insight
      3. Using the Facebook API
    4. Running the Example
    5. Inside the Task
      1. Connecting to Facebook and Collecting Data
      2. Modeling Data Records with .NET Data Structures
      3. Keeping the User Interface Responsive
      4. Saving the Results in your SAS Enterprise Guide Task
    6. Chapter Summary
  23. Chapter 16: Building a SAS Catalog Explorer
    1. About This Task
      1. Source Files for this Example
    2. About SAS Catalogs
      1. Working with SAS Catalogs
    3. The SAS Catalog Explorer Interaction
      1. Creating a Utility Window that Floats
      2. Using SAS Workspace APIs
      3. Using Windows Presentation Foundation (WPF)
    4. Chapter Summary
  24. Chapter 17: Building a SAS Macro Variable Viewer and SAS System Options Viewer
    1. About These Tasks
      1. Example Source Files and Information
    2. Creating a Productive User Experience
      1. Creating a Toolbox Window
      2. Remembering the Window Position
      3. Adding an about Window with Version Information
    3. Designing Code with Objects and Lists
      1. Planning for Object-Oriented Design
      2. Using Data Structures to Represent SAS Objects
    4. Performing Other Cool Tricks
      1. Checking the Version of SAS
      2. Running SAS Language Functions
      3. Parsing the SAS Log to Detect Line Types
    5. Chapter Summary
  25. Index
  26. Accelerate Your SAS Knowledge with SAS Books