The EXTDESC keyword can be specified to indicate which file the compiler should use at compile time to obtain the external descriptions for the file.
The file specified by the EXTDESC keyword is used only at compile time. At runtime, the file is found using the same rules as would be applied if the EXTDESC keyword was not specified. You can use additional keyword EXTFILE(*EXTDESC) if you also want the file specified by the EXTDESC keyword to be used at runtime.
The EXTDESC keyword must be specified before any keywords that have record format names as parameters such as IGNORE, INCLUDE, RENAME, and SFILE, and before any keywords whose validity depends on the actual file, such as INDDS and SLN.
filename
libname/filename
*LIBL/filename
* At compile time, file MYLIB/MYFILE1 will be used to
* get the definition for file "FILE1", as specified by
* the EXTDESC keyword.
* At runtime, file *LIBL/FILE1 will be opened. Since
* the EXTFILE keyword is not specified, the file name
* defaults to the RPG name for the file.
Ffile1 if e disk
F extdesc('MYLIB/MYFILE1')
* At compile time, file MYLIB/MYFILE2 will be used to
* get the definition for file "FILE2", as specified by
* the EXTDESC keyword.
* At runtime, file MYLIB/MYFILE2 will be opened, as
* specified by the EXTFILE(*EXTDESC) keyword.
Ffile2 if e disk
F extdesc('MYLIB/MYFILE2')
F extfile(*extdesc)