Declaring A User Aggregate - Tandem ENFORM 058057 Reference Manual

Data management library
Table of Contents

Advertisement

Declaring a User Aggregate

internal-format
is the internal format for storing the user variable, aggregate or table.
display-format
is the default display format for printing the declared item.
heading-string
is a string literal that is the default heading for the declared element. Remember
string literals must be enclosed in quotation marks (" ").
Specify the DECLARE statement before you reference a user variable, user aggregate,
or user table. ENFORM stores information about each user-defined element in the
internal table. This information remains in the internal table until you issue a
subsequent CLOSE statement for the user-defined element, issue a DICTIONARY
statement or a ?DICTIONARY command, or end the ENFORM session.
User aggregates are processed just like the predefined aggregates. The step-expression
of a user aggregate can contain:
Arithmetic expressions
IF/THEN/ELSE expressions.
The optional end-expression is the final operation to be performed after all of the
qualifying records are processed by the step-expression. The end-expression can contain
any of the following:
Predefined aggregates
Arithmetic expressions
IF/THEN/ELSE expressions.
By default, the starting-value for a user aggregate is zero unless the user aggregate is
defined with alphanumeric internal format. In this case, the default value is blanks.
An initial value is supplied when you specify initialize-constant. If you omit end-
expression but specify initialize-constant, precede initialize-constant with two commas.
The following example uses the DECLARE statement to define a user aggregate:
DECLARE project (x) = ( IF x < 2000 THEN project + x + .05 * x
ELSE project + x + .04 * x ) ;
More information about user aggregates can be found in Section 3.
058057 Tandem Computers Incorporated
Statements
DECLARE Statement
4–9

Hide quick links:

Advertisement

Table of Contents
loading

This manual is also suitable for:

Enform

Table of Contents