SAS 论文
Paper 235-30
Catch the Stream: Stored Processes, ODS, and Java Jeff Wright, ThotWave Technologies LLC, Cary, NC
ABSTRACT
Wouldn't it be great if there was a straightforward way of taking SAS programs and making their output available on
demand via a web browser? Sure, you probably know that you can use ODS to format SAS output as static HTML
pages that can be copied to a web server, but what if your program uses data sources that change every day, or
every hour? Building on demand, web-based reports via SAS potentially requires an array of technologies ranging
from HTML to web programming to SAS to databases. Some approaches require one programmer to master all
these skills, but stored processes bring an appealing division of labor to this picture. A stored process is just a
parameterized SAS program that is callable via the SAS Integration Technologies Integrated Object Model (IOM)
API. By encapsulating SAS logic in this way, the SAS programmer and web developer can each focus on the areas
they know best.
This tutorial will introduce how SAS stored processes can be called from a web application, using Java as the
example programming language. The IOM calls for stored process execution will be described, as well as the
fundamentals behind using socket communication to stream back ODS results. Practical tips will be offered on
developing, testing, and deploying applications using this technology. Stored processes have received a lot of
publicity from SAS with respect to their support in SAS9, but are available and useful in SAS 8.2 as well.
INTRODUCTION
This tutorial explores how SAS stored processes can be used to stream analytic results formatted with ODS back to
another programming language such as Java. Let's define these terms:
A stored process is a SAS program that is stored on a server and can be executed as required by requesting
applications (quoting the documentation).
Streaming is a communication technique where we make SAS think it's writing to a file, but the output is actually
being sent back to the requesting application via a network socket.
ODS is the Output Delivery System, the standard Base SAS facility for formatting procedure output.
This tutorial may be interesting to you if you
… are looking for a good way to make SAS analytics available on-demand to a wide audience via a web
interface.
… have a SAS/IntrNet application and want to migrate it to some more current technology.
… want to get ready for SAS9, and know that stored processes are a part of that.
… have seen SAS9 stored process demos using products like the Add-In for Microsoft Office, and want to know
how that works.
… just automatically devour all the information about SAS you can get your hands on.
We'll start by looking at a simple SAS report, and examine how to convert it to a stored process and run it under some
of the pre-built SAS9 clients. Then we'll look at one of the Integration Technologies APIs for calling stored processes
from Java, one that works under SAS 8.2 as well as SAS9. With that understanding to build on, we'll go back to the
SAS side of things and talk about how ODS and streaming actually work. Then we'll wrap up by taking a quick tour of
some advanced topics, and also provide some pointers to the new SAS9 API for stored processes.
EXAMPLE REPORT
For this tutorial, we'll be referring to the sample Shoe Sales by Subsidiary report shown in Listing 1. This report starts
life as a SAS program. ODS is used to format the two output tables as HTML. It uses standard sample data in the
SASHELP library, so you can probably run it on your own system.
Note that a macro symbol ®ION is used to subset the shoe sales data. This ®ION parameter can be
manually adjusted, the report can be run, and the output can be shared with others by copying it to a web server.
indexing of multimedia documents in the context of SaR processes and ...Furthermore, the information stored in the ODS serves as a complete log ...
indexing of multimedia documents in the context of SaR processes and ...Furthermore, the information stored in the ODS serves as a complete log ...
热门文档