๐”– Scriptorium
โœฆ   LIBER   โœฆ

๐Ÿ“

Custom Tasks for SAS Enterprise Guide Using Microsoft .NET

โœ Scribed by Chris Hemedinger


Publisher
SAS Institute
Year
2012
Tongue
English
Leaves
280
Category
Library

โฌ‡  Acquire This Volume

No coin nor oath required. For personal study only.

โœฆ Synopsis


Have you ever used SAS Enterprise Guide and found yourself wishing that it had that one specific feature, something that you know would make it the perfect tool for your work or industry? You don't have to settle for just the "out of the box" features; you can add your own capabilities with SAS custom tasks! Chris Hemedinger's new book takes you 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. In the first part of the book, you'll learn how to use the development environment and the programming interfaces provided by SAS to create, test, and deploy new custom tasks. You'll learn about the services that the SAS Enterprise Guide framework offers, including data access, the ability to run SAS programs, and integration of your custom results into a SAS Enterprise Guide project. In the second part of the book, Hemedinger provides a variety of useful, field-tested and ready-to-run examplesโ€”complete with C# and Visual Basic .NET source code. Each example highlights different programming techniques that you can apply immediately within your own custom tasks. The book also addresses important aspects of .NET programming, such as debugging, exception handling, threading models, and user interface design. This book is part of the SAS Press program.

โœฆ Table of Contents


copyrt_new
toc_new
AboutThisBook_new
Is this Book for You?
What You Should Know Before Reading
How this Book is Organized
How to Access the Examples and Source Code
Software Used to Develop the Examples
More Resources for Fun and Learning
AboutTheAuthor_new
Acknow_new
chap1_new
Why Isnโ€™t Everything Built In for Me?
Options for Custom Processes in SAS Enterprise Guide
What Can I Do with Custom Tasks?
Who Uses Custom Tasks Today and What Do They Use Them For?
Before Custom Tasks: SAS/AF
Bringing Custom Tasks to the Desktop
In the Field: Custom Tasks at Work
Deploying Custom Tasks
Method 1: Drop-In Deployment
SAS Enterprise Guide 4.1 and the SAS Add-In for Microsoft Office 2.1
SAS Enterprise Guide and the SAS Add-In for Microsoft Office 4.2, 4.3, 5.1, and later
Example Deployment Scenarios
Method 2: Add-In Manager
Accessing Custom Tasks from the Menu
Common Questions about Task Deployment
Accessing Ready-to-Use Example Tasks and Source Code
Exercise: Download, Deploy, and Access Custom Tasks from SAS
Chapter Summary
chap2_new
Introduction to the Microsoft .NET Framework
Which Language Is Right for You?
Introduction to Microsoft Visual Studio
Selecting a Version of Microsoft Visual Studio
The Express Editions of Microsoft Visual Studio
The Microsoft Visual Studio Environment
Other Tools to Make You More Productive
Learning to be a .NET Programmer
Resources for the New .NET Programmer
Build or Buy: Using Third-Party Components
Chapter Summary
chap3_new
Overview of the Process
Getting the Project Templates for Microsoft Visual Studio
Creating New Custom Tasks Using Project Templates
Using Microsoft Visual Studio 2010 or 2008
Installing the Templates on Your PC
Creating a Custom Task Project Using Visual Basic 2010 Express
Creating a Custom Task Project Using Visual C# 2010 Express
Creating a Custom Task Project Using Visual Studio Professional
Creating a Custom Task Project Using Microsoft Visual Studio 2003
Chapter Summary
chap4_new
About Interfaces
Meet the Interfaces
Versioned Interfaces
Understanding the Life Cycles of Your Task
Life Cycle of a Task during Discovery
Life Cycle of a Task during Open and Show
Life Cycle of a Task during Run
Exercise: Observe the Life Cycle of a Task
Special Interfaces for Special Tasks
Greater Control Using ISASTaskExecution
Access the Project Contents with ISASProject
More Interfaces That Play Nice
Chapter Summary
chap5_new
Task Toolkit: Whatโ€™s In It?
The SasTask Class
The SasServer Class and SAS.Tasks.Toolkit.Data Namespace
The SAS.Tasks.Toolkit.SasSubmitter Class
The SAS.Tasks.Toolkit.Helpers Namespace
The SAS.Tasks.Toolkit.Controls Namespace
SAS.Tasks.Toolkit.Controls.SASTextEditorCtl
Examples of Using the SAS.Tasks.Toolkit Classes
Example: Describe the Scope and Behavior of a Task
Example: Navigate the SAS Server and Library Hierarchy
Example: Check Whether a SAS Library Connects to a Database
Example: Retrieving the Value of a SAS Macro Variable
Example: Submitting a Program and Displaying the Log
Chapter Summary
chap6_new
Your First Custom Task Using Visual Basic Express
Creating the Project
Turning the Visual Basic Class into a Custom Task
Build, Deploy, and Test
Adding a User Interface
Saving and Restoring Task Settings
Chapter Summary
chap7_new
Your First Custom Task Using Visual C# Express
Creating the Project
Turning the C# Class into a Custom Task
Build, Deploy, and Test
Adding a User Interface
Saving and Restoring Task Settings
Chapter Summary
chap8_new
Best Practices for Making Your Software Debuggable
Take Advantage of Object-Oriented Design
Consider Unit Testing
Catch and Handle Exceptions
Prevent the Preventable Exceptions
Catch and Handle Recoverable Exceptions
Example: Testing for Null Reference and Handling Exceptions
Use Logging to Record Events and Progress
What Can the Log Tell You?
How to Enable Logging in SAS Enterprise Guide
Add Your Own Logger and Produce Log Messages
Use Logging Techniques to Profile Your Task
Debug with Microsoft Visual Studio
Debugging Basics: Some Definitions
Prepare to Debug a Custom Task
How to Attach a Debugger to a Custom Task
Example: Debugging a Custom Task
Troubleshooting: When Breakpoints Arenโ€™t Hit
Chapter Summary
chap9_new
About This Example
Example Source Files and Information
Step 1: Exploring the Problem
Step 2: Creating the SAS Program
Step 3: Creating the Custom Task
Examining the Top N Report Solution
Technique: Read and Show the Available Columns
Technique: Save the Task Settings Using a Serializable Class
Chapter Summary
chap10_new
About This Example
Example Source Files and Information
Whatโ€™s in Your Project?
Displaying Properties in a Simple User Interface
Accessing Properties Using the ISASProject APIs
Retrieving the Process Flows
Retrieving the Tasks in a Process Flow
Selecting a Task
Retrieving the Properties for the Selected Task
More Possibilities with SAS Enterprise Guide Projects
Chapter Summary
chap11_new
About This Example
Example Source Files and Information
Designing the Task Features
Assumptions: They Are Necessary
Scenario 1: Calculate the Running Total for One Measure across All Rows
Scenario 2: Calculate Running Totals across Groups
Designing the User Interface
Assembling the User Interface
Step 1: Add the Necessary Assembly References
Step 2: Clean Up the Boilerplate User Interface
Step 3: Add Common Task Controls to the Toolbox
Step 4: Add the SAS Task Toolkit Controls to the Form
Hooking the Controls to Data and Events
Initializing the TaskSelectedDataControl
Defining the Role Categories in SASVariableSelector
Adding the Data Columns to the Variable Selector
Remembering Where You Parked Your Variables
Validating the User Selections
Saving User Selections
Using LINQ to Create XML
Using LINQ to Read XML
Generating a Correct SAS Program
Creating a Readable Program Header
Applying the Task-Specific Filter
Wrap Your Variable Names Appropriately
Chapter Summary
chap12_new
About This Example
Example Source Files and Information
Dissecting a SAS Data Set
Using .NET to Read Data from SAS Data Sets
Creating an Elegant Task Flow
Adding the SAS Enhanced Editor to a Windows Form
Using ISASTaskExecution to Take Matters into Your Own Hands
Cancel: Support Is Optional
ResultCount: How Many Results?
Run, Task, Run!
Chapter Summary
chap13_new
About This Task
Example Source Files and Information
Adapting the Sample
Refactoring a Macro
Compressing the Data Even Further
See How You Did: Adding Reporting
Wrapping the Sample in a Task
Designing a User Interface
Browsing the SAS Environment to Select Output
Validating User Input
Modeling the Options in a .NET Class
Putting It All Together: Running and Repeating the Task
Chapter Summary
chap14_new
About This Task
Example Source Files and Information
Building a Task That Runs Commands
The Structure of This Task
Implementing a Task with ISASTaskExecution
Extending a SasTask Class to Include ISASTaskExecution
Donโ€™t Forget: Writing Output to the Log
Completing the Run Method
A Note of Caution about ISASTaskExecution
Chapter Summary
chap15_new
Facebook to SAS: The Approach
Example Source Files and Information
Gathering Data from Facebook
Example of Transforming JSON to DATA Step Statements
Analyzing Data from Facebook
Preparing Data for Reporting
Creating Reports That Provide Insight
Determining Gender Distribution
Determining the Ages of Your Friends
Using the Facebook API
Running the Example
Inside the Task
Connecting to Facebook and Collecting Data
Connecting to Facebook: Get In and Get Out
Modeling Data Records with .NET Data Structures
Turning the Data into a SAS Program
Keeping the User Interface Responsive
Saving the Results in Your SAS Enterprise Guide Task
Chapter Summary
chap16_new
About This Task
Source Files for This Example
About SAS Catalogs
Working with SAS Catalogs
Using the CATALOG Window
Using the CATALOG Procedure
Using the FILENAME Statement
Using a SAS DICTIONARY Table
The SAS Catalog Explorer Interaction
Creating a Utility Window That Floats
Making a Task Window Modeless
Using SAS Workspace APIs
Using Windows Presentation Foundation (WPF)
Data Binding
Chapter Summary
chap17_new
About These Tasks
Example Source Files and Information
Creating a Productive User Experience
Creating a Toolbox Window
Anatomy of a Toolbox Window
Enforcing a Single Instance of the Task
Remembering the Window Position
Storing Your Taskโ€™s User Settings
Retrieving Your Taskโ€™s User Settings
Ensuring That the Window Is Visible
Adding an About Window with Version Information
Designing Code with Objects and Lists
Planning for Object-Oriented Design
Using Data Structures to Represent SAS Objects
Populating a List of SAS Object Values
Applying a Filter Using LINQ
Performing Other Cool Tricks
Checking the Version of SAS
Running SAS Language Functions
Parsing the SAS Log to Detect Line Types
Chapter Summary
93150_AdTemplate_PrintedBook_7x9_final
Index_new.pdf
Index
A
B
C
D
E
F
G
H
I
J
L
M
N
O
P
Q
R
S
T
U
V
W
X
Numbers and Symbols
chap10_new.pdf
About This Example
Example Source Files and Information
Whatโ€™s in Your Project?
Displaying Properties in a Simple User Interface
Accessing Properties Using the ISASProject APIs
Retrieving the Process Flows
Retrieving the Tasks in a Process Flow
Selecting a Task
Retrieving the Properties for the Selected Task
More Possibilities with SAS Enterprise Guide Projects
Chapter Summary
chap12_new.pdf
About This Example
Example Source Files and Information
Dissecting a SAS Data Set
Using .NET to Read Data from SAS Data Sets
Creating an Elegant Task Flow
Adding the SAS Enhanced Editor to a Windows Form
Using ISASTaskExecution to Take Matters into Your Own Hands
Cancel: Support Is Optional
ResultCount: How Many Results?
Run, Task, Run!
Chapter Summary
Index_new.pdf
Index
A
B
C
D
E
F
G
H
I
J
L
M
N
O
P
Q
R
S
T
U
V
W
X
Numbers and Symbols
chap11_new.pdf
About This Example
Example Source Files and Information
Designing the Task Features
Assumptions: They Are Necessary
Scenario 1: Calculate the Running Total for One Measure across All Rows
Scenario 2: Calculate Running Totals across Groups
Designing the User Interface
Assembling the User Interface
Step 1: Add the Necessary Assembly References
Step 2: Clean Up the Boilerplate User Interface
Step 3: Add Common Task Controls to the Toolbox
Step 4: Add the SAS Task Toolkit Controls to the Form
Hooking the Controls to Data and Events
Initializing the TaskSelectedDataControl
Defining the Role Categories in SASVariableSelector
Adding the Data Columns to the Variable Selector
Remembering Where You Parked Your Variables
Validating the User Selections
Saving User Selections
Using LINQ to Create XML
Using LINQ to Read XML
Generating a Correct SAS Program
Creating a Readable Program Header
Applying the Task-Specific Filter
Wrap Your Variable Names Appropriately
Chapter Summary


๐Ÿ“œ SIMILAR VOLUMES


Business Analytics Using SAS Enterprise
โœ Olivia Parr-Rud ๐Ÿ“‚ Library ๐Ÿ“… 2014 ๐Ÿ› SAS Institute ๐ŸŒ English

<b>This tutorial for data analysts new to SAS Enterprise Guide and SAS Enterprise Miner provides valuable experience using powerful statistical software to complete the kinds of business analytics common to most industries.</b> <p> Todayโ€™s businesses increasingly use data to drive decisions that k