IBM AS/400 Frozen Dessert Maker User Manual


 
Defining Externally Described Files
Once a record-format is ignored, it cannot be specified for any other keyword
(SFILE, RENAME, or INCLUDE), or for another IGNORE.
Ignored record-format names appear on the cross-reference listing, but they are
flagged as ignored.
To indicate that a record format from an externally described file, is to be ignored,
enter the keyword and parameter IGNORE(
record-format name
) on the file
description specification in the Keyword field.
Alternatively, the INCLUDE keyword can be used to include only those record
format names that are to be used in a program. All other record formats contained
in the file will be excluded.
*.. 1 ...+... 2 ...+... 3 ...+... 4 ...+... 5 ...+... 6 ...+... 7 ...+... *
FFilename++IPEASFRlen+LKlen+AIDevice+.Keywords+++++++++++++++++++++++++++++
*
* Assume the file ITMMSTL contains the following record formats:
* EMPLNO, NAME, ADDR, TEL, WAGE. To make the program run as if only the
* EMPLNO and NAME records existed, either of the following two methods
* can be used:
*
FITMMSTL UF E K DISK IGNORE(ADDR:TEL:WAGE)
*
* OR:
*
FITMMSTL UF E K DISK INCLUDE(EMPLNO:NAME)
*
Figure 132. IGNORE Keyword for Record Formats in an Externally Described File
Using Input Specifications to Modify an External Description
You can use the input specifications to override certain information in the external
description of an input file or to add RPG functions to the external description. On
the input specifications, you can:
Assign record-identifying indicators to record formats as shown in Figure 133
on page 268.
Rename a field as shown in Figure 133 on page 268.
Assign control-level indicators to fields as shown in Figure 133 on page 268.
Assign match-field values to fields for matching record processing as shown in
Figure 134 on page 268.
Assign field indicators as shown in Figure 134 on page 268.
You cannot use the input specifications to override field locations in an externally
described file. The fields in an externally described file are placed in the records in
the order in which they are listed in the data description specifications. Also,
device-dependent functions such as forms control, are not valid in an RPG program
for externally described files.
Note: You can explicitly rename a field on an input specification, even when the
PREFIX keyword is specified for a file. The compiler will recognize (and
require) the name that is first
used
in your program. For example, if you
specify the prefixed name on an input specification to associate the field
Chapter 14. Defining Files 267