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

<SASREPEAT> Tag

Repeats a substitution for all entries that match given criteria.

Syntax

   <SASREPEAT>

   </SASREPEAT>

Details

The <SASREPEAT> tag causes a substitution that is enclosed within the tag to repeat for all entries that match the specified name/value pair, as described in Specifying Name/Value Pairs. Without the <SASREPEAT> tag, the substitution stops after matching the first entry.

Any HTML tags or static text that are included in the <SASREPEAT> tag are inserted into the output along with the substitution data, and those tags are repeatedly inserted each time a new entry matches the name/value pair.

The <SASREPEAT> tag is recognized only within the <SASINSERT> tag and is relevant only when it is used with name/value pair substitutions.

Examples

The following example uses the <SASREPEAT> tag to build a list of reports. The substitutions and the HTML tag within the <SASREPEAT> tag are repeated for each entry that matches the type=report name/value pair.

   <SASINSERT>

   Available reports include the following:
   <ul>
   <SASREPEAT>
   <li> $(entry="(type=report)" 
      attribute=description)</li>
   </SASREPEAT>
   </ul>

   </SASINSERT>

An example of the rendered view follows:


Available reports include the following:

  • President's State of the Union address
  • AlphaliteAirways Annual Report
  • Sales Quotas for Midwest Territory

The next example uses the <SASREPEAT> tag to build a table. The substitutions and the HTML tags within the <SASREPEAT> tag are repeated for each entry in the main package that matches the type=report name/value pair.

   <table border="1" cellspacing="0" cellpadding="3">
   <SASINSERT>
   <SASREPEAT>
   <tr><td>$(entry="(type=report)" 
      attribute=description)</td></tr>
   </SASREPEAT>
   </SASINSERT>
   </table>       

An example of the rendered view follows:

President's State of the Union Address AlphaliteAirways Annual Report Sales Quotas for Midwest Territory