File description specifications identify each file used by a module or procedure. Each file in a program must have a corresponding file description specification statement.
A file can be either program-described or externally described. In program-described files, record and field descriptions are included within the RPG program (using input and output specifications). Externally described files have their record and field descriptions defined externally using DDS, SQL commands, or a screen designer or print designer such as those available in Rational® Developer for i.
You define an externally-described file
in free-form by specifying *EXT for the
file-device keyword or by specifying the keyword without a parameter.
You define a program-described file in fixed-form
by specifying E in position
22 of the file description specification. 
You define a program-described file
in free-form by specifying a record length for the
file-device keyword.
You define a program-described file in fixed-form
by specifying F in position
22 of the file description specification. 
You can specify file specifications in two different
formats:
