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

Using the <SASINSERT> and <SASTABLE> Tags: Examples

The following example uses the <SASINSERT> and <SASTABLE> tags to build a list. The SAS data set that is used is the second entry that is added to the main package. The value of the fileName variable is substituted on each repetition.

   <p>
   <SASINSERT>
   <ul>
   <SASTABLE ENTRY=2>
   <li>$(VARIABLE=fileName)</li>
   </SASTABLE>
   </ul>
   </SASINSERT>

The following example uses the <SASINSERT> and <SASTABLE> tags to build a table. The SAS data set entry is the first entry in the main package. The value of the variables fname, lname, state, and homepage are used to create the table. The newly created table will contain one row for each row in the main package.

   <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>
   <tbody>
   <SASTABLE ENTRY=1>
   <tr> <td> $(Variable=fname)</td>
   <td> $(Variable=lname)</td>
   <td> $(Variable=state)</td>
   <td> <a href=$(Variable=homepage)> 
      $(variable=homepage)</a></td></tr>
   </SASTABLE>
   <tr><td colspan=4 align=center>
   Note: Simple table example.</td></tr>
   </table>
   </SASTABLE>

Refer to A Sample Viewer Template to see formatted output from <SASINSERT> and <SASTABLE> examples.