SAS 9.1.3 Integration Technologies » Developer's Guide

Developing Windows Clients
Client Requirements
Client Installation
Selecting a Windows Programming Language
Programming with Visual Basic
Programming in the .NET Environment
Using VBScript
Programming with Visual C++
Using the Object Manager
Creating an Object
Object Manager Interfaces
Using a Metadata Server with the Object Manager
Metadata Configuration Files
Error Reporting
Code Samples
Using Connection Pooling
Choosing Integration Technologies or COM+ Pooling
Using Integration Technologies Pooling
Using Com+ Pooling
Pooling Samples
Using the IOM Data Provider
Using the Workspace Manager
Class Documentation
Windows Clients

Developing Windows Clients

When developing Microsoft Windows clients, you interact with the SAS Integrated Object Model (IOM) using the Microsoft Component Object Model (COM). In all the leading programming language products under Windows, and in most Windows applications, COM is the predominant mechanism for software interoperability on the Windows platform.

For the benefit of Windows applications, SAS manifests its Integrated Object Model as a COM component that uses the automation type system. Microsoft calls this type of COM component an ActiveX component or an OLE Automation server.

Manifesting SAS as an ActiveX component has a number of benefits:

  • It can be called from a wide variety of programming language environments such as Microsoft Visual Basic (including Visual Basic for Applications and VBScript), Microsoft Visual C++, Borland C++Builder, Visual Basic .NET, and Visual C# .NET, Perl, Borland Delphi, and others.
  • SAS processing can be invoked from the macro language of many popular applications including those in Microsoft Office.
  • The programming language skills most commonly used to build solutions in the Windows environment can also be applied to developing solutions that involve SAS.
  • Operating system-level security, configuration and management are the same for SAS as for other applications and systems utilities.

In addition to these standard advantages for integration via COM, the SAS Integrated Object Model offers a superior capability that is not commonly available to ActiveX components. This function, known as the IOM Bridge for COM, provides the ability to transparently run the server on platforms other than Windows. Using this bridge, a Windows application can request SAS analytical processing against the often voluminous data on a UNIX or z/OS server and receive the results without knowing that SAS is processing the request on a platform other than Windows. Given the heavy use of UNIX and z/OS servers to store and process large-scale enterprise data, this is a significant advantage.

The exact interfacing technique used by Windows language products has evolved over the years. The initial approach documented in COM was to support calls from Visual Basic through an interface known as IDispatch. When using the IDispatch interface, calls into an interface go through a single method (IDispatch:Invoke) and then the appropriate implementation code is looked up at run time. This technique was compatible with early versions of Visual Basic, but was sub-optimal because of the amount of run-time interpretation involved in a method call. To improve performance, subsequent versions of Visual Basic and other languages developed the ability to call methods directly. This is known as v-table binding. Besides yielding better performance, v-table binding is also the most natural approach for COM calls from C++. The IOM implementation of ActiveX component interfaces uses the dual interface layout that provides both IDispatch and v-table binding. This gives the best performance from newer language implementations, but still supports the Dispatch technique for client languages (including VBScript and JScript) that use the older, sub-optimal approach.

SAS 9 Integration Technologies includes a new client-side component called the object manager. The Version 8 workspace manager—which can only use the LDAP server—will still be supported, but it is recommended that you use the object manager interface in order to take advantage of the new features.

If you are using a SAS Metadata Server, the object manager allows you to launch and manage objects on other SAS Metadata Servers, SAS Workspace Servers, SAS Stored Process Servers, and SAS OLAP Servers.