Every file used in a program must have a unique name. The file name
can be from 1 to 10 characters long, and must begin in position 7.
At compile time:
If the file is program-described, the file named in position 7 does not
need to exist.
If the file is externally-described, the file named in position
7 must exist but you can use an IBM i system override command to associate
the name to a file defined to the IBM i system, or you can use the EXTDESC
keyword to indicate the file defined to the system.
At run time:
If you use the EXTFILE keyword, the EXTMBR keyword, or both, RPG will
open the file named in these keywords.
Otherwise, RPG will open the file named in position 7. This file (or an
overridden file) must exist when the file is opened.
If an IBM i system override command has been used for the file that RPG
opens, that override will take effect and the actual file opened will depend
on the override. See the EXTFILE(filename | *EXTDESC) keyword for more information
about how overrides interact with this keyword.
When files that are not defined by the USROPN keyword are opened
at run time, they are opened in the reverse order to that specified in the
file description specifications. The RPG IV device name defines the operations
that can be processed on the associated file.