ROW Block

Purpose

Processes each table row returned from a function call. Net.Data processes the statements within the ROW block once for each row.

Syntax

              .--------------------------.
              V                          |
>>-%ROW--{-------+--------------------+--+--%}-----------------><
                 +-string-------------+
                 +-if block-----------+
                 +-variable reference-+
                 +-function call------+
                 +-HTML statements----+
                 +-include statement--+
                 '-while block--------'
 

Values

%ROW
The keyword that specifies that HTML formatted data is to be displayed, once for each row of data returned from a function call.

string
Any sequence of alphabetic and numeric characters and punctuation.

if block
The IF block. Performs conditional string processing. String values in the condition list are treated as numeric for comparisons if they are strings that represent integers and have no leading or trailing white space. They can have a single leading plus (+) or minus (-) sign. See IF Block for syntax and examples.

variable reference
Returns the value of a variable and is specified with $ and (). For example: if VAR='abc', then $(VAR) returns the value 'abc'. See Variable Reference for syntax information.

function call
Invokes one or more FUNCTION or MACRO_FUNCTION blocks, or built-in functions with specified arguments. See Function Call (@) for syntax and examples.

HTML statements
Includes any alphabetic or numeric characters, as well as HTML tags to be formatted for the client's browser.

include statement
The INCLUDE statement. Reads and incorporates a file into the Net.Data macro. See INCLUDE Statement for syntax and examples.

while block
The WHILE block. Performs looping with conditional string processing. See WHILE Block for syntax and examples.

Context

The ROW block can be found in these contexts:

Restrictions

The ROW block can contain these elements:

Examples

Example 1: A two-column HTML table showing a list of names and locations

%REPORT{
<h2>Query Results</h2>
<p>Select a name for details.
<table border=1>
<tr><td>Name</td><td>Location</td>
 
%ROW{
<tr>
<td>
<a href="/cgi-bin/db2www/name.mac/details?name=$(V1)&location=$(V2)">$(V1)</a></td>
<td>$(V2)</td>
%}
 
</table>
%}

Selecting a name in the table calls the details HTML block of the name.mac Net.Data macro and sends it the two values as part of the URL. In this example, the values can be used in name.mac to look up additional details about the name.


[ Top of Page | Previous Page | Next Page | Index ]