ILE RPG programs and automatic report programs can both refer to DDM files. Generally, DDM file names can be specified in ILE RPG programming language anywhere a database file name can be specified, for both iSeries™ and non-iSeries target servers.
When an ILE RPG program opens a DDM file on the source server, the following types of I/O operations can be performed on the remote file at the target server, for both iSeries and non-iSeries targets: CHAIN, CLOSE, DELET, EXCPT, FEOD, OPEN, READ, READE, READP, SETGT, SETLL, UPDAT, and WRITE.
Other considerations are:
A recommended method for describing remote files, when the target is not an iSeries server or a System/38, is to have the data description specifications (DDS) on the local server and enter a Create Physical File (CRTPF) command or a Create Logical File (CRTLF) command on the local server. Compile the program using the local file name. Ensure that the remote system's file has the corresponding field types and field lengths.
To access the remote file, use the Override with Database File (OVRDBF) command preceding the program, for example:
OVRDBF FILE(PGMFIL) TOFILE(DDMFIL) LVLCHK(*NO)