SAS 9.1.3 Integration Technologies » Developer's Guide


Viewer Processing
Usage
When to Use a Viewer
How to Create a Viewer
How to Apply a Viewer
Reference
SASINSERT Tag
Substitution Syntax
SASTABLE Tag
SASREPEAT Tag
SASECHO Tag
Examples
Using the SASINSERT and SASTABLE Tags
Sample HTML Viewer
SAS Program with an HTML Viewer
Sample Viewer Template
Publishing Framework

Sample Viewer Template

A SAS program creates a package and applies a viewer template that is named realview.html. During package publishing, viewer tag processing renders a view of the package for delivery via e-mail.

   <html>
   <HEAD>
   <META HTTP-EQUIV="Content-Type CONTENT="text/html; 
      charset=ISO-8859-1">
   <TITLE>Daily Purchase Summary</TITLE>
   </HEAD>
   <BODY>
   <p>

   <SASINSERT>
   <h1>Table Example using SASTABLE</h1>
   <table border cellspacing=0 cellpadding=5 
      rules=groups>
   <thead>
   <tr><th>First Name</th>
   <th>Last Name</th>
   <th>State </th>
   <th>HomePage</th></tr>
   </thead>
   <tbody>
   <SASTABLE ENTRY=2>
   <tr><td> $(VARIABLE=fname)</td>
   <td> $(VARIABLE=lname)</td>
   <td> $(VARIABLE=state)</td>
   <td> <a href="$(VARIABLE=homepage)"> 
      $(VARIABLE=homepage)</a> </td>
   </tr>
   </tbody>
   </SASTABLE>
   </table>

   <p>
   <h1>List Example using SASTABLE</h1>
   <ul>
   <SASTABLE ENTRY=3>
   <li>$(VARIABLE=org)</li>
   </SASTABLE>
   </ul>

   <P>
   <h2>Example using Stream</h2>
   <SASINSERT>
   <a href="$(ENTRY=1 ATTRIBUTE=STREAM)">$(ENTRY=1 
      ATTRIBUTE=STREAM)</a>
   </SASINSERT>
   <p>
   </BODY>
   </html>

Simulated Rendered View of the Package in E-mail

The following rendered view simulates the information that is displayed by the preceding viewer template.


Daily Purchase Summary

Table Example using SASTABLE

First Name Last Name State HomePage
John Smith NY http://alphaliteairways.com/~jsmith
Gary DeStephano NY http://alphaliteairways.com/~gdest
Arthur Allen CA http://alphaliteairways.com/~aallen
Jean Forest CA http://alphaliteairways.com/~jforest
Tony Votta NC http://pizza.com/~tova
Dakota Smith NC http://alphaliteairways.com/~dakota

List Example using SASTABLE

  • Sales
  • Marketing
  • R&D

Example using Stream

http://alphaliteairways.com