This topic presents a sample application that uses DDM to access a remote file.
The application can be run by a company that has warehouses located in several cities. The following figure illustrates the relationships among the primary items included in a DDM file.
On an iSeries™ server in Chicago, an Open Database File (OPNDBF) command requests that file CUST021 be opened for input. Because the file name was not qualified on the command, the library list for the source job is used to find the file, which is stored in the NYCLIB library.
Because CUST021 is a DDM file, the SDDM on the CHICAGO server is started in the source job when the file is opened. The SDDM uses the remote location and mode names (NEWYORK and MODENYC) from the DDM file to establish a DDM conversation with and start a target job (TDDM) on the appropriate target server (NEWYORK). The remote file to be accessed by the source server program is CUSTMAST in library XYZ.
The TDDM receives the remote file name from the SDDM and then allocates and opens the file named CUSTMAST, which corresponds to the DDM file named CUST021 on the source server.
The remote location name in the DDM file identifies the remote server where the file exists. The local server uses the remote location name as well as other values specified in the DDM file to select a device description. The device description can be either manually created or, if APPN is being used, automatically created and activated by the server. The SDDM establishes a DDM conversation with the target server using the values NEWYORK and MODENYC in the APPC remote location name. The APPC-related support must have been started on the target server before the request is issued by the SDDM. (No special support is required on the source server.)