LIST Statements
Statements
058057 Tandem Computers Incorporated
4–33
Input Record Description
When you use a LIST statement, ENFORM opens the data files associated with any
open record descriptions. (You open record descriptions by using OPEN statement.)
ENFORM obtains information about the structure of the data file from the record
description. The record description describes the file type (key-sequenced, relative,
entry-sequenced, unstructured) of the data file. The actual file type of a data file must
be the same as the file type described in the record description; otherwise, your query
might return incorrect results.
Group Definition and
Sorting
BY and BY DESC clauses group and sort records. ENFORM prints the by-item value
for a group only for the first record of all the records that have the same value for the
by-item. By-items can be referred to by CUM OVER, PCT OVER, SUBTOTAL OVER,
AFTER CHANGE, and BEFORE CHANGE clauses. These clauses are described in
Section 5.
ASCD and DESC clauses sort records in ascending or descending order. They do not
identify a group. The ASCD and DESC clauses are described in Section 5.
When a LIST statement contains more than one BY, BY DESC, ASCD, or DESC clause,
ENFORM determines a major to minor sorting precedence. ENFORM determines the
sorting precedence by the order in which the clauses appear in the LIST statement.
The first clause has highest priority and is sorted first, the next one second priority,
down to the last specified clause.
How Values Are Displayed
in Report Columns
ENFORM displays target-items and by-items in report columns, one column per item. If
a record name is a target-item in a LIST statement, ENFORM expands the record to as
many target-items as the number of elementary fields in the record. If a field within the
record is described with an OCCURS clause, ENFORM prints each occurrence of the
field in a separate column of the report. Do not specify a record name as a target-item if
it is the same as a field name in a record. Refer to Section 3 for information about field
names. A target-item in a LIST statement can be:
a record name
LIST ...,
parts;
the name of a field
LIST ...,
partnum;
a numeric literal. Enclose numeric literals within parentheses.
LIST ...,
"manager";
an arithmetic expression enclosed in parentheses. The expression can use any
combination of numeric fields, numeric literals, numeric user variables, predefined
aggregates, user aggregates, JULIAN-DATE clauses, or system variable clauses.
LIST ...,
(price * quantity);
Summary of Contents for ENFORM 058057
Page 6: ...New and Changed Information 058057 Tandem Computers Incorporated v...
Page 18: ...Preface xvi 058057 Tandem Computers Incorporated This page left intentionally blank...
Page 19: ...Preface 058057 Tandem Computers Incorporated xvii...
Page 269: ...Glossary Glossary 4 058057 Tandem Computers Incorporated This page left intentionally blank...