Using ASP.NET to leverage data and processes in SAS Servers

Using ASP.NET to leverage data and processes in SAS Servers Using ASP.NET to leverage data and processes in SAS Servers

sascommunity.org
from sascommunity.org More from this publisher

<strong>Us<strong>in</strong>g</strong> <strong>ASP</strong>.<strong>NET</strong> <strong>to</strong><br />

<strong>leverage</strong> <strong>data</strong> <strong>and</strong><br />

<strong>processes</strong> <strong>in</strong> <strong>SAS</strong> <strong>Servers</strong><br />

An<strong>to</strong>n Fuchs<br />

EMEA Bus<strong>in</strong>ess Intelligence Technology Strategist<br />

Copyright © 2003, <strong>SAS</strong> Institute Inc. All rights reserved.


Objectives<br />

! The presentation should give an overview on<br />

• How <strong>SAS</strong> supports the .Net framework <strong>to</strong>day<br />

• How <strong>SAS</strong> supports the .Net framework <strong>in</strong> future<br />

! Examples based on <strong>ASP</strong>.Net<br />

Copyright © 2003, <strong>SAS</strong> Institute Inc. All rights reserved.


Agenda<br />

! The importance of <strong>in</strong>tegration<br />

! .Net framework <strong>and</strong> <strong>SAS</strong> – The Present<br />

! .Net framework <strong>and</strong> <strong>SAS</strong> – The Future<br />

! Conclusion<br />

Copyright © 2003, <strong>SAS</strong> Institute Inc. All rights reserved.


The importance of <strong>in</strong>tegration<br />

! Information <strong>and</strong> <strong>data</strong> overload<br />

! Information com<strong>in</strong>g from various systems <strong>and</strong><br />

architectures.<br />

• Heterogenous environments the rule rather than exception.<br />

• Multiple application platforms the rule rather than exception<br />

! It becomes more <strong>and</strong> more complex <strong>to</strong> <strong>in</strong>tegrate<br />

those.<br />

Copyright © 2003, <strong>SAS</strong> Institute Inc. All rights reserved.


The <strong>in</strong>tegration imperative<br />

Complex Hardware<br />

Environments<br />

More users<br />

Explosion of<br />

Data<br />

IT asked <strong>to</strong><br />

do more<br />

with less<br />

Disparate<br />

Applications<br />

Copyright © 2003, <strong>SAS</strong> Institute Inc. All rights reserved.


The importance of Integration<br />

! One aspect of <strong>in</strong>tegration is the ability <strong>to</strong><br />

<strong>in</strong>teroperate between different software systems<br />

<strong>and</strong> architectures.<br />

• Microsoft <strong>in</strong>frastructure<br />

• Java <strong>in</strong>frastructure<br />

• Ma<strong>in</strong>frame, W<strong>in</strong>dows, Unix, L<strong>in</strong>ux, OpenVMS, etc…<br />

• 64-bit vs. 32-bit<br />

• Etc….<br />

! <strong>SAS</strong> delivers a highly <strong>in</strong>teroperable, hardwareagile<br />

<strong>and</strong> future-proof platform for IT…that<br />

<strong>in</strong>tegrates!<br />

Copyright © 2003, <strong>SAS</strong> Institute Inc. All rights reserved.


The importance of Integration<br />

Corners<strong>to</strong>nes <strong>to</strong> <strong>SAS</strong> Intelligence Architecture<br />

• Usability<br />

• Scalability<br />

• Manageability<br />

• Interoperability<br />

Copyright © 2003, <strong>SAS</strong> Institute Inc. All rights reserved.


The importance of Integration<br />

! COM/DCOM support <strong>and</strong> COM bridge<br />

! <strong>SAS</strong> drivers for ODBC <strong>and</strong> OLE DB<br />

! <strong>SAS</strong> driver for OLE DB for OLAP<br />

! XML <strong>in</strong>terchange eng<strong>in</strong>e, application, APIs<br />

! ADO/OLE DB <strong>to</strong> <strong>SAS</strong> for W<strong>in</strong>dows clients<br />

! <strong>SAS</strong> BI Web services support<br />

! LDAP support (Microsoft Active Direc<strong>to</strong>ry)<br />

! Message-oriented Middleware (MOM) adapters<br />

• Microsoft Message Queue (MSMQ)<br />

! <strong>SAS</strong> analytics deployable <strong>in</strong> C++<br />

! <strong>SAS</strong>/ACCESS <strong>to</strong> PC File formats (DBF, DIF, WKx, XLS)<br />

! Access <strong>to</strong> SQL Server Analysis Services from Enterprise Guide 2.0<br />

! Integrate <strong>in</strong><strong>to</strong> .Net framework (ADO.Net, <strong>ASP</strong>.Net, VB.Net...)<br />

! more, more, more...<br />

Copyright © 2003, <strong>SAS</strong> Institute Inc. All rights reserved.


The importance of Integration<br />

Our goal as a company: <strong>to</strong> enhance the<br />

value of our cus<strong>to</strong>mer’s <strong>in</strong>vestment <strong>in</strong> <strong>SAS</strong>,<br />

no matter what the technology exploitation<br />

<strong>to</strong>ols are.<br />

Copyright © 2003, <strong>SAS</strong> Institute Inc. All rights reserved.


Interoperability with the .Net framework<br />

<strong>to</strong>day<br />

! The follow<strong>in</strong>g slides will give you an overview on<br />

some of the various possibilities <strong>to</strong> <strong>in</strong>tegrate with<br />

the Microsoft .Net framework<br />

! Integration can be on<br />

• Data level<br />

• Process level<br />

Copyright © 2003, <strong>SAS</strong> Institute Inc. All rights reserved.


<strong>SAS</strong> <strong>and</strong> the .<strong>NET</strong> framework<br />

! <strong>SAS</strong> already supports the .<strong>NET</strong> framework.<br />

• Data access via ADO.<strong>NET</strong><br />

• <strong>SAS</strong> COM objects can be references via COM <strong>in</strong>terop<br />

• Support for .<strong>NET</strong> Web services<br />

• Access <strong>to</strong> .Net Dataset via:<br />

− <strong>SAS</strong> XML Eng<strong>in</strong>e<br />

− <strong>SAS</strong> OLEDB <strong>data</strong> provider<br />

! Further support will come with future versions<br />

(see slides ahead for more <strong>in</strong>formation)<br />

Copyright © 2003, <strong>SAS</strong> Institute Inc. All rights reserved.


Data access via ADO.Net<br />

! There are 3 <strong>data</strong> providers from <strong>SAS</strong> that<br />

support the OLE DB specifications<br />

• <strong>SAS</strong> Local Data Provider<br />

− Requires only BASE <strong>SAS</strong><br />

− Access <strong>to</strong> <strong>SAS</strong> <strong>data</strong>sets <strong>in</strong> a COM environment<br />

• <strong>SAS</strong>/SHARE Data Provider<br />

− Requires BASE <strong>SAS</strong> <strong>and</strong> <strong>SAS</strong>/SHARE<br />

− Access <strong>to</strong> <strong>SAS</strong> <strong>data</strong>sets via a <strong>SAS</strong>/SHARE server<br />

• <strong>SAS</strong> IOM Data Provider<br />

− Requires BASE <strong>SAS</strong> <strong>and</strong> <strong>SAS</strong> Integration Technologies<br />

− Access <strong>to</strong> <strong>SAS</strong> <strong>data</strong>sets via a <strong>SAS</strong> Object Server<br />

Copyright © 2003, <strong>SAS</strong> Institute Inc. All rights reserved.


Data access via ADO.Net<br />

http://support.sas.com/rnd/eai/samples/ADOnet/<strong>in</strong>dex.html<br />

Copyright © 2003, <strong>SAS</strong> Institute Inc. All rights reserved.


Copyright © 2003, <strong>SAS</strong> Institute Inc. All rights reserved.<br />

Example 1: <strong>ASP</strong>.Net <strong>and</strong> ADO.Net<br />

<br />

Display Dataset<br />

<br />

<br />


Example 1: <strong>ASP</strong>.Net <strong>and</strong> ADO.Net<br />

<br />

<br />

<br />

<br />

private void But<strong>to</strong>n1_Click(object sender,<br />

System.EventArgs e)<br />

{<br />

System.Data.OleDb: Namespace that conta<strong>in</strong>s<br />

all OLE DB relevant classes <strong>to</strong> access 3 rd<br />

party DBMS.<br />

But<strong>to</strong>n1_click: The c# method that is called<br />

when click<strong>in</strong>g on the “Get <strong>data</strong>set” but<strong>to</strong>n.<br />

See next slide for code that will be executed.<br />

}<br />

<br />

// See next slide for code<br />

Copyright © 2003, <strong>SAS</strong> Institute Inc. All rights reserved.


Example 1: <strong>ASP</strong>.Net <strong>and</strong> ADO.Net<br />

try {<br />

OleDbConnection cn = new OleDbConnection();<br />

cn.ConnectionStr<strong>in</strong>g = "Provider=sas.ShareProvider.1;<br />

Data Source=shr1;<br />

Location=localhost;<br />

User ID=xxxxxx;Password=xyz";<br />

cn.Open();<br />

Label1.Text = "<strong>SAS</strong> Server Version: " + cn.ServerVersion;<br />

OleDbComm<strong>and</strong> cmd = cn.CreateComm<strong>and</strong>();<br />

cmd.Comm<strong>and</strong>Type = Comm<strong>and</strong>Type.TableDirect;<br />

cmd.Comm<strong>and</strong>Text = libName.Text + "." + <strong>data</strong>Set.Text;<br />

OleDbDataReader reader = cmd.ExecuteReader();<br />

resultDataGrid.DataSource = reader;<br />

resultDataGrid.DataB<strong>in</strong>d();<br />

reader.Close();<br />

}<br />

catch (Exception ex)<br />

{<br />

Label1.Text = "An exception was thrown. Error: " + ex.Message;<br />

}<br />

if ( ( cn != null) && ( cn.State != ConnectionState.Closed ) ) cn.Close();<br />

cn = null;<br />

The highlighted code snippet def<strong>in</strong>es an<br />

OLE DB connection <strong>to</strong> a <strong>SAS</strong>/Share<br />

server, retrieves the values from <strong>SAS</strong><br />

<strong>and</strong> s<strong>to</strong>res them <strong>in</strong> the reader object.<br />

Copyright © 2003, <strong>SAS</strong> Institute Inc. All rights reserved.


try {<br />

}<br />

Copyright © 2003, <strong>SAS</strong> Institute Inc. All rights reserved.<br />

Example 1: <strong>ASP</strong>.Net <strong>and</strong> ADO.Net<br />

OleDbConnection cn = new


Copyright © 2003, <strong>SAS</strong> Institute Inc. All rights reserved.<br />

Example 1: <strong>ASP</strong>.Net <strong>and</strong> ADO.Net


<strong>SAS</strong> <strong>and</strong> COM <strong>in</strong>terop<br />

! <strong>SAS</strong> COM objects can be referenced via COM<br />

<strong>in</strong>terop<br />

• Although .<strong>NET</strong> assemblies are the best choice for new<br />

applications, you may at times need <strong>to</strong> employ COM<br />

objects<br />

• The ability <strong>to</strong> easily <strong>and</strong> naturally call COM components<br />

<strong>in</strong> a .<strong>NET</strong> framework is called COM <strong>in</strong>terop<br />

• You can create such <strong>in</strong>teroperability objects for the <strong>SAS</strong><br />

type libraries (see next slides)<br />

Copyright © 2003, <strong>SAS</strong> Institute Inc. All rights reserved.


<strong>SAS</strong> Integrated Object Model (IOM)<br />

<strong>SAS</strong> Workspace<br />

DataService<br />

FileService<br />

Utilities<br />

LanguageService<br />

Libref<br />

Fileref<br />

FormatService<br />

ResultPackageService<br />

OptionService<br />

HostSystem<br />

ADO/OLE DB<br />

or JDBC<br />

S<strong>to</strong>redProcessService<br />

Copyright © 2003, <strong>SAS</strong> Institute Inc. All rights reserved.


<strong>SAS</strong> <strong>and</strong> COM <strong>in</strong>terop<br />

! <strong>SAS</strong> COM objects can be references via COM<br />

<strong>in</strong>terop<br />

• Visual Studio .<strong>NET</strong> or the .Net SDK conta<strong>in</strong> a utility,<br />

tlbimp, that lets you import <strong>in</strong>formation from a type<br />

library <strong>in</strong><strong>to</strong> a .<strong>NET</strong> application.<br />

tlbimp /sysarray "c:\Program Files\<strong>SAS</strong> Institute\Shared Files\Integration Technologies\<strong>SAS</strong>.tlb“<br />

tlbimp /sysarray "c:\Program Files\<strong>SAS</strong> Institute\Shared Files\Integration Technologies\<strong>SAS</strong>Wman.dll”<br />

Run the follow<strong>in</strong>g two comm<strong>and</strong>s <strong>to</strong> create the COM <strong>in</strong>terop assemblies. You will need <strong>to</strong> modify the<br />

path <strong>to</strong> your shared files folder if you did not <strong>in</strong>stall <strong>SAS</strong> <strong>in</strong> the default location.<br />

Copyright © 2003, <strong>SAS</strong> Institute Inc. All rights reserved.


Example 2: <strong>SAS</strong> <strong>and</strong> COM <strong>in</strong>terop<br />

<br />

<br />

<br />

<br />

<br />

<br />

<br />

<br />

Copyright © 2003, <strong>SAS</strong> Institute Inc. All rights reserved.


Copyright © 2003, <strong>SAS</strong> Institute Inc. All rights reserved.<br />

Example 2: <strong>SAS</strong> <strong>and</strong> COM <strong>in</strong>terop


<strong>SAS</strong> <strong>and</strong> .<strong>NET</strong> Web services<br />

! Support for .<strong>NET</strong> Web services<br />

• <strong>SAS</strong> co-sponsors the XML for Analysis organization<br />

<strong>to</strong>gether with Microsoft<br />

• Contribut<strong>in</strong>g member of Web services Interoperability<br />

organization (WS-I)<br />

• White paper on how <strong>to</strong> implement a <strong>SAS</strong> Web service<br />

http://www.sas.com/apps/whitepapers/whitepaper.jsp<br />

Copyright © 2003, <strong>SAS</strong> Institute Inc. All rights reserved.


<strong>SAS</strong> <strong>and</strong> .<strong>NET</strong> Web services<br />

Sample application<br />

http://support.sas.com/rnd/eai/samples/DotNetWebService/<strong>in</strong>dex.html<br />

Copyright © 2003, <strong>SAS</strong> Institute Inc. All rights reserved.


<strong>SAS</strong> <strong>and</strong> .<strong>NET</strong> Web services<br />

Example: Noel-Levitz us<strong>in</strong>g <strong>SAS</strong> 8.2<br />

SQL<br />

Scor<strong>in</strong>g<br />

Models<br />

Admissions<br />

College<br />

Student<br />

Data Process Solution<br />

Base <strong>SAS</strong><br />

<strong>SAS</strong>/ACCESS <strong>to</strong> ODBC<br />

<strong>SAS</strong> Enterprise M<strong>in</strong>er models<br />

Integration Technologies<br />

Web services<br />

Enrollment Management<br />

Recruitment<br />

Retention<br />

Assistance<br />

Copyright © 2003, <strong>SAS</strong> Institute Inc. All rights reserved.


<strong>SAS</strong> <strong>and</strong> .<strong>NET</strong> Web services<br />

Example: Noel-Levitz us<strong>in</strong>g <strong>SAS</strong> 8.2<br />

! Reduced time <strong>to</strong> deliver <strong>in</strong>formation <strong>to</strong> cus<strong>to</strong>mers<br />

• “First <strong>in</strong> the mailbox”<br />

• Students more likely <strong>to</strong> apply<br />

! Reduced cost <strong>to</strong> implement<br />

• $200K <strong>in</strong>stead of $600K<br />

• Paradigm shift of implementation <strong>to</strong> provide<br />

<strong>in</strong>stantaneous answers <strong>to</strong> cus<strong>to</strong>mers<br />

! Improved cus<strong>to</strong>mer satisfaction by allow<strong>in</strong>g<br />

unlimited scor<strong>in</strong>g<br />

! Increased sales<br />

Copyright © 2003, <strong>SAS</strong> Institute Inc. All rights reserved.


<strong>SAS</strong> 9.1 <strong>and</strong> .<strong>NET</strong> Web services<br />

! <strong>SAS</strong> Integration Technologies 9.1 <strong>in</strong>cludes support for<br />

creat<strong>in</strong>g Web services.<br />

• <strong>SAS</strong> BI web services for .Net<br />

• <strong>SAS</strong> BI web services for Java<br />

See Presentation The <strong>SAS</strong>® XML/A Web Services Framework at 16:05.<br />

Copyright © 2003, <strong>SAS</strong> Institute Inc. All rights reserved.


<strong>SAS</strong> 9.1 <strong>and</strong> the <strong>SAS</strong>ObjectManager<br />

IIS<br />

ObjectManager<br />

<strong>ASP</strong>X<br />

Sassps.dll<br />

<strong>SAS</strong> S<strong>to</strong>red Process Server<br />

Copyright © 2003, <strong>SAS</strong> Institute Inc. All rights reserved.<br />

<strong>SAS</strong> Meta<strong>data</strong> Server


<strong>SAS</strong> 9.1 <strong>and</strong> the .Net framework<br />

.Net Web<br />

services<br />

<strong>ASP</strong>.<strong>NET</strong><br />

etc<br />

<strong>SAS</strong>® Web<br />

Report Studio<br />

<strong>SAS</strong>® Enterprise<br />

Guide<br />

<strong>SAS</strong>® Add-In for<br />

Microsoft Office<br />

<strong>SAS</strong>® Information<br />

Delivery Portal<br />

Common Infrastructure<br />

Bus<strong>in</strong>ess Meta<strong>data</strong><br />

Shared Meta<strong>data</strong><br />

Shared Data<br />

Copyright © 2003, <strong>SAS</strong> Institute Inc. All rights reserved.


Conclusion<br />

! <strong>SAS</strong> is an open platform support<strong>in</strong>g all important<br />

technologies <strong>and</strong> <strong>in</strong>dustry st<strong>and</strong>ards<br />

! Microsoft .Net framework is an important part <strong>and</strong><br />

we can easily <strong>in</strong>teroperate.<br />

! Support for MS <strong>to</strong>ols <strong>and</strong> the .Net framework will<br />

even be extended <strong>in</strong> version 9.1<br />

Copyright © 2003, <strong>SAS</strong> Institute Inc. All rights reserved.


References<br />

! Microsoft asp.net<br />

http://www.asp.net<br />

! <strong>SAS</strong> Integration Technologies<br />

http://support.sas.com/rnd/itech<br />

! Enterprise Integration Community<br />

http://support.sas.com/rnd/eai<br />

! An<strong>to</strong>n.Fuchs@eur.sas.com<br />

Copyright © 2003, <strong>SAS</strong> Institute Inc. All rights reserved.


Copyright © 2003, <strong>SAS</strong> Institute Inc. All rights reserved.

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!