2006 Shane Gibson

22
Copyright © 2006, SAS Institute Inc. All rights reserved. SAS Users New Zealand Proudly sponsored by… know are know are

Transcript of 2006 Shane Gibson

Page 1: 2006 Shane Gibson

Copyright © 2006, SAS Institute Inc. All rights reserved.

SAS Users New Zealand

Proudly sponsored by…

knowareknoware

Page 2: 2006 Shane Gibson

Copyright © 2006, SAS Institute Inc. All rights reserved.

How to disperse the smoke and smash the mirrors SAS Stored Processes

Page 3: 2006 Shane Gibson

Copyright © 2006, SAS Institute Inc. All rights reserved.

Stored Process in SAS9

Before Stored Processes:• Difficult to share or re-use SAS programs

• Limited ability to publish dynamic content

• Often limited to the SAS user community

After Stored Processes:• Dynamic SAS content accessible to the enterprise

• Authors can focus on the problem, not the processes or the tools

• Authors are not just publishing content; they are creating tools to empower decision makers

Page 4: 2006 Shane Gibson

Copyright © 2006, SAS Institute Inc. All rights reserved.

What Can Stored Processes Do?

Create business reports

Perform analysis

Data Integration processes

Provide services to other applications

Anything a SAS program can do

Page 5: 2006 Shane Gibson

Copyright © 2006, SAS Institute Inc. All rights reserved.

What Is a SAS Stored Process?

A SAS program described by metadata• Data steps, Procs, Macro

A standard for reusable SAS programs• Multiple clients – Web, Java, MS Office, Web Services

• Multiple output formats and delivery options

• Multiple platforms

A core technology for many SAS products

Page 6: 2006 Shane Gibson

Copyright © 2006, SAS Institute Inc. All rights reserved.

A Simple Stored Process

%stpbegin;title "Shoe Sales by Region and Product";footnote;

proc report data=webdata.shoes; column region product sales; define region / group; define product / group; define sales / analysis sum; break after region / ol summarize suppress skip;run;%stpend;

Page 7: 2006 Shane Gibson

Copyright © 2006, SAS Institute Inc. All rights reserved.

Stored Process Authoring Clients

Enterprise Guide• General purpose development environment

SAS Management Console (SMC) Stored Process Manager• Register programs from other sources

• Manage stored process metadata

DI Studio• Export DI process flows as stored processes

Other SAS Code Generators (e.g. Enterprise Miner)• Manual process, but simple to do

Page 8: 2006 Shane Gibson

Copyright © 2006, SAS Institute Inc. All rights reserved.

Demonstration - Stored Process Creation

Page 9: 2006 Shane Gibson

Copyright © 2006, SAS Institute Inc. All rights reserved.

Stored Process Inputs

Data sources• SAS data sets

• External tables (SAS/ACCESS)

• XML (XML Library Engine)

Parameters

Other• External files

• Client data streams

• SAS catalogs

Page 10: 2006 Shane Gibson

Copyright © 2006, SAS Institute Inc. All rights reserved.

Stored Process Outputs

Data targets• SAS data sets

• External tables (SAS/ACCESS)

• XML (XML Library Engine)

• Information Maps

Generated content (Output Delivery System)• HTML, XML, PDF, etc.

• GIF, PNG, ActiveX, Java graphics

Page 11: 2006 Shane Gibson

Copyright © 2006, SAS Institute Inc. All rights reserved.

Stored Process Metadata

Metadata describes the stored process• Name, Description, Keywords, etc.

• Location of source code

• Server

• Inputs – Streams, Parameters

• Outputs – Streams, Packages

• Access control

Page 12: 2006 Shane Gibson

Copyright © 2006, SAS Institute Inc. All rights reserved.

Stored Process Consumption Clients

Web• Information Delivery Portal

• Stored Process Web Application

• Custom JSPs or Servlets

Microsoft Office

Enterprise Guide

Information Maps

Web Report Studio Reports

Web Services

Page 13: 2006 Shane Gibson

Copyright © 2006, SAS Institute Inc. All rights reserved.

Demonstration - Stored Process Consumption

Page 14: 2006 Shane Gibson

Copyright © 2006, SAS Institute Inc. All rights reserved.

SAS Metadata Architecture

Central to stored processes

Metadata documents an interface contract• Allows any consumer to use stored processes created

by any author.

Metadata describes behavior• Input parameters

• Input data sources

• Output data, content, delivery options

• Execution environment, security rules, etc.

Page 15: 2006 Shane Gibson

Copyright © 2006, SAS Institute Inc. All rights reserved.

Input Parameters

Defined by metadata

Values specified at run-time• Property sheet interface (JSP, Java App, or Windows)

• Custom input form

• Fixed – in a URL, script or program

Default values

Constraints – ranges, enumerated values

Page 16: 2006 Shane Gibson

Copyright © 2006, SAS Institute Inc. All rights reserved.

Adding Parameters

%global region;%stpbegin;title "Shoe Sales for &region";Title "By Subsidiary and Product";footnote;

proc report data=webdata.shoes; where region eq "&region"; column subsidiary product sales; define subsidiary / group; define product / group; define sales / analysis sum; break after subsidiary / ol summarize suppress skip;run;%stpend;

Page 17: 2006 Shane Gibson

Copyright © 2006, SAS Institute Inc. All rights reserved.

Demonstration - Stored Process Business Rules

Page 18: 2006 Shane Gibson

Copyright © 2006, SAS Institute Inc. All rights reserved.

Security

Integrated security model• Provided by the SAS Metadata Architecture

• Single sign-on across all SAS servers

Integrated Web server security

Access control on each stored process, data source and output target

Administered with SAS Management Console.

Page 19: 2006 Shane Gibson

Copyright © 2006, SAS Institute Inc. All rights reserved.

Stored Process Server

Dedicated to executing stored processes

Multi-user server designed for scalability

Server logic implemented with Threaded Kernel

Same SAS execution engine as batch SAS or the Workspace server

Configured with SAS Management Console Server Manager

Page 20: 2006 Shane Gibson

Copyright © 2006, SAS Institute Inc. All rights reserved.

Scalability

Many configuration options

Start on demand, reusable servers

Load balanced clusters

Pre-started servers

Easy to configure multiple servers for different performance classes

Page 21: 2006 Shane Gibson

Copyright © 2006, SAS Institute Inc. All rights reserved.

Summary

A standard for reusable SAS logic

Stored processes can be authored and executed in a wide variety of SAS tools

Stored processes make the power of SAS accessible to everyone

SAS 9 implements stored processes on a secure, scalable and maintainable platform

SAS users already know how to write stored processes!

Page 22: 2006 Shane Gibson

Copyright © 2006, SAS Institute Inc. All rights reserved.Copyright © 2006, SAS Institute Inc. All rights reserved.