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 HTML Viewer

This sample HTML viewer example is a collection of viewer coding sections that are described in Creating a Viewer.

   <!--Section 1: Formatting a Data Set 
      Variable in an HTML List--> 
   <SASINSERT>
   <h2>Congratulations!</h2>
   $(entry=1 attribute=description)
   <p>
   <ul>
   <SASTABLE ENTRY=2>
   <li>$(VARIABLE=fname)
   </SASTABLE>
   </ul>

   <!--Section 2: Formatting a SAS Data Set 
      in a Table--> 
   <h2>Record Sales from these Salespeople</h2>
   $(entry=1 attribute=description)
   <table border cellspacing=0 cellpadding=5 
      rules=groups>
   <thead>
   <tr>
   <th>First Name</th>
   <th>Last Name</th>
   <th>Territory</th>
   </tr>
   </thead>
   <tbody>
   <SASTABLE ENTRY=1>
   <tr>
   <td> $(VARIABLE=fname)</td>
   <td> $(VARIABLE=lname)</td>
   <td> $(VARIABLE=territory)</td>
   </tr>
   </tbody>
   </SASTABLE>
   </table>

   <!--Section 3: Inserting a Text File 
      and a Reference-->
   <h2>Letter of Congratulations</h2>
   Below is a copy of the letter that was sent 
   to each recipient of the top sales award.
   $(entry=2 attribute=stream)
   <p>
   See <a href="$(entry=3 attribute=stream)">$(entry=3 
   attribute=stream)</a> for detailed sales figures.

   <!--Section 4: Filtering an Entry-->
   <h2>Message from the President</h2>
   <SASREPEAT>
   $(entry="(type=report)" attribute=stream)
   </SASREPEAT>
   </SASINSERT>

Rendered View in E-mail

The rendered view appears in e-mail as follows:


Congratulations!

AlphaliteAirways Sales Force Briefing

  • John
  • Gary
  • Arthur
  • Jean
  • Tony
  • Dakota

Record Sales from these Salespeople

AlphaliteAirways Sales Force Briefing

First Name Last Name Territory
John Smith NE
Gary DeStephano SE
Arthur Allen MW
Jean Forest NW
Tony Votta SW
Dakota Smith HA

Letter of Congratulations

Below is a copy of the letter that was sent to each recipient of the top sales award.

                           December 30, 2000
   
                           International Sales
                           AlphaliteAirways Headquarters

   Dear AlphaliteAirways Salesperson,

   Congratulations on your much deserved recognition as 
   outstanding salesperson for AlphaliteAirways for 2000.

   To express our gratitude for your excellent contribution, 
   we wish to present you with 25 stock options in 
   AlphaliteAirways.

   Wishing you continued success in your career with 
   AlphaliteAirways.

                           Sincerely,

                           Alvin O. Taft, Jr.
                           Director-in-Chief

   See http://www.AlphaliteAirways.com/headquarters/sales 
   for detailed sales figures.

Message from the President

   AlphaliteAirways delivers service. AlphaliteAirways is the 
   recognized industry leader according to its safety 
   record, volume of passengers served, and routes serviced.

   How are we able to live up to such high expectations 
   consistently? First and foremost, we do it through the 
   abilities of our top salespeople. We owe a huge debt to 
   these hard-working individuals who actively pursue 
   revenue for this company.