RPT_MAX_ROWS

AIX HP-UX Linux OS/2 OS/390 OS/400 PTX SUN Win NT
X X X X X X X X X

Purpose

Specifies the number of rows in a table that are processed in a function REPORT block or during the generation of a default report if a REPORT block is not specified.

The database language environments use this variable to limit the number of rows returned, which can subtantially improve performance for large result sets. Use this variable with START_ROW_NUM to break queries with large result sets into smaller tables, each on its own HTML page.

Specify the value of this variable using a DEFINE statement or with the @DTW_ASSIGN() function.

Values

RPT_MAX_ROWS="ALL"|"0"|"number"

Table 5. RPT_MAX_ROWS Values
Values Description
ALL Indicates that there is no limit on the number of rows to be displayed in a table generated by a function call. All rows will be displayed.
0 Specifies that all rows in the table will be displayed. This value is the same as specifying ALL.
number A positive integer indicating the maximum number of rows to be displayed in a table generated by a function call.

If the FUNCTION block contains a REPORT and ROW block, this number specifies the number of times the ROW block is executed.

Examples

Example 1: Defines RPT_MAX_ROWS in a DEFINE statement

%DEFINE RPT_MAX_ROWS="20"

The above method limits the number of rows any function returns to 20 rows.

Example 2: Uses HTML input to define the variable with an HTML form

Maximum rows to return (0 for no limit):
<input type="text" name="rpt_max_rows" size=3 />

The lines in the above example can be placed in a FORM tag to let the application users set the number of rows they want returned from a query.


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