14.01.2013 Views

SAS 9.3 BI Web Services Developer's Guide

SAS 9.3 BI Web Services Developer's Guide

SAS 9.3 BI Web Services Developer's Guide

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

Chapter 2<br />

Writing <strong>SAS</strong> <strong>BI</strong> <strong>Web</strong> <strong>Services</strong><br />

Using XMLA<br />

Writing <strong>SAS</strong> Programs for XMLA <strong>Web</strong> <strong>Services</strong> . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9<br />

Discover Method . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11<br />

Overview of the Discover Method . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11<br />

RequestType . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11<br />

Restrictions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 14<br />

Properties . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 14<br />

Result . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 16<br />

Execute Method . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 16<br />

Overview of the Execute Method . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 16<br />

Command . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 16<br />

Properties . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 17<br />

Result . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 18<br />

Sample PROC MEANS Using <strong>SAS</strong> <strong>BI</strong> <strong>Web</strong> <strong>Services</strong> . . . . . . . . . . . . . . . . . . . . . . . . 18<br />

Sample Overview . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 18<br />

Write the Stored Process . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 18<br />

Define the Metadata . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 19<br />

Invoke the Stored Process . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 21<br />

Writing <strong>SAS</strong> Programs for XMLA <strong>Web</strong> <strong>Services</strong><br />

To use the <strong>Web</strong> service to call your <strong>SAS</strong> code, you must configure your <strong>SAS</strong> code as a<br />

stored process. A stored process is a <strong>SAS</strong> program that is stored on a server and can be<br />

executed by requesting applications. Any stored process can be deployed as a generated<br />

<strong>Web</strong> service. However, stored processes that are used with XMLA <strong>Web</strong> services need to<br />

conform to rules that enable the <strong>Web</strong> service to receive data from the client and return<br />

data to the client.<br />

You can author a stored process manually by using <strong>SAS</strong> or a text editor to write the code<br />

and then registering the program through <strong>SAS</strong> Management Console. Alternatively, you<br />

can use a program such as <strong>SAS</strong> Enterprise <strong>Guide</strong> or another <strong>SAS</strong> code generator to<br />

author a stored process using the point-and-click method. Use the following<br />

modifications to make a stored process that can be used with <strong>SAS</strong> <strong>BI</strong> <strong>Web</strong> <strong>Services</strong>.<br />

Keep in mind that XMLA <strong>Web</strong> services can return XML data only; no attachments can<br />

be returned.<br />

Note: XMLA <strong>Web</strong> services in <strong>SAS</strong> <strong>9.3</strong> will work only with <strong>SAS</strong> <strong>9.3</strong> stored process<br />

metadata and <strong>SAS</strong> <strong>9.3</strong> Stored Process Servers.<br />

9

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

Saved successfully!

Ooh no, something went wrong!