Example 5: 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 table is an example of the information that might be displayed by the preceding viewer template:
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