Introduction to ENFORM

Statements, Clauses, and Commands
Using ENFORM—The Basics
058051 Tandem Computers Incorporated 2–9
Figure 2-7. Example of Simple Formatted ENFORM Report
TITLE information Inventory Report
SUBTITLE information XYZ Inc.
Item Headings
PARTNAME PARTNUM PRICE
Items from database SYSTEM 192 KB CORE 212 92000.00
This is an example of using ENFORM to do a lot of work with a few specifications.
Clearly, this is a simple example, but it does show the basic components of practically
every ENFORM query.
Typically, you will use ENFORM to produce a report that:
Prints data items sorted by groups; by supplier number, for example.
Prints different headings for the columns of the report.
Calculates and prints subtotals for the groups and totals for all groups; for
example, the cost of all items in inventory from a particular supplier.
Selects and prints items that meet some criteria like “inventory greater than
$2500.”
Note that the word item simply means a specific piece of information from the
database; for example, part number 100212.
ENFORM clauses, which are discussed in the following pages, enable you to do the
preceding report by augmenting the basic statements.
Clauses Clauses are optional components of ENFORM statements; they specify additional data
selection and formatting criteria. This section discusses three types of clauses:
1. field selection and sorting
2. item formatting
3. new items
Field Selection and Sorting Clauses
These clauses can be used to specify selection criteria for the data that will contribute
to the report and to specify how the data should be sorted. Typical clauses in this
group are WHERE, BY, and ASCD.
OPEN parts;
LIST parts WHERE price LESS THAN 20000;
will select and print only those inventory items that are priced less than $20000.00.