Enform Plus Reference Manual
Statements
Enform Plus Reference Manual—422684-001
4-17
Output Record Dictionary Description
Output Record Dictionary Description
Before executing the FIND statement, you must include a description of the output 
record in the dictionary. When the FIND statement is executed, Enform Plus either 
writes the output records to the physical file specified in the dictionary or transmits the 
output records to a host-language program. In either case, the Data Definition Language 
(DDL) record description must describe the file type as unstructured.
The following example shows the DDL source code used to produce a dictionary record 
description for the output record findfil:
RECORD findfil.
02 custname PIC X(18).
02 custnum PIC 9(4).
02 partcost PIC 9(6)V99.
end
Enform Plus allows you to specify database tables (see the description of subscripts 
under Subscripts on page 3-8 for information about database tables) in the record 
description of the output record. The following record description contains a database 
table named child:
RECORD newemp.
02 name PIC X(18).
02 child PIC X(18) OCCURS 4 times.
end
You can specify that output records are to be written to a particular physical file either 
by including the DDL FILE IS clause in the dictionary record description or by 
specifying the ?ASSIGN command. You can also use the ?ASSIGN command to cause 
Enform Plus to write the records to a file other than the one described in the dictionary. 
The physical file generated by a FIND statement is always an unstructured file.
In the record description, an output field can differ in data format (picture size, scale, 
BINARY vs. ASCII numeric string, and so on) from the description of the input field as 
long as the output field has the same data type (numeric or alphanumeric) as the input 
field. Enform Plus performs the data format conversion automatically, including: 
truncation or padding with blanks for alphanumeric input and output fields of different 
lengths, binary to ASCII string conversion (or ASCII to binary), and scaling conversion 
for numeric input and output fields.
Group Definition and Sorting
The BY and BY DESC clauses group and sort records. The appearance of a BY or BY 
DESC clause in a FIND statement causes every occurrence of a grouped by-item 
value to be written to the output record (unlike the LIST statement where only the first 
occurrence of a grouped value is written to the output record). The BY and BY DESC 
clauses are described under BY and BY DESC Clauses
 on page 5-32.
The ASCD and DESC clauses sort records in ascending or descending order. They do not 
identify a group. The ASCD and DESC clauses are also described under ASCD and 
DESC Clauses on page 5-6.










