A User Variable In Request-Qualification; User Tables; Arithmetic Overflow Conditions - Tandem ENFORM 058057 Reference Manual

Data management library
Table of Contents

Advertisement

ENFORM Language Elements

Arithmetic Overflow Conditions

A User Variable in
Request-Qualification

User Tables

Arithmetic Overflow
Conditions
3–32
A user variable can be specified in a request-qualification. When a user variable is
used for request qualification, ENFORM always uses either the default or initial value
whichever is appropriate. Consider the following:
SET u-var to 10;
LIST ordernum,
u-var:= (ordernum + u-var)
WHERE u-var > 10;
The preceding query always returns zero target-records even though in every target-
record the value of u-var (ordernum + u-var) is greater than 10. No target-records are
returned because ENFORM uses the initial value of the user variable to evaluate the
WHERE clause. Since u-var is set to 10, no target-records are selected for a WHERE
clause with a logical expression u-var > 10.
User tables are special kinds of user variables that can store more than one value.
Currently a user table can have a maximum of 64 elements called occurrences.
ENFORM issues an error message if you attempt to define a table with more than 64
occurrences.
The individual elements of a user table can be referenced by using subscripts. Refer to
the discussion of subscripts in this section for more information.
Like user variables, user tables can be initialized by the SET statement. The default
value of all elements in a user table is zero. When a user table is specified as a target-
item, ENFORM determines its value in the same manner the value of a user variable is
determined. Assignment syntax can be used to assign values to single elements of a
table.
An arithmetic overflow condition can occur when ENFORM computes a value for:
an arithmetic expression.
a predefined aggregate (such as: SUM or AVG) or a user-defined aggregate.
An arithmetic overflow condition does not cause ENFORM to issue either an error or a
warning message. Instead, ENFORM truncates the result of the computation. If an
arithmetic overflow condition occurs when ENFORM is computing an intermediate
result, ENFORM uses the truncated result to complete the computation.
058057 Tandem Computers Incorporated

Hide quick links:

Advertisement

Table of Contents
loading

This manual is also suitable for:

Enform

Table of Contents