CL Command Reference - CRTDDMF
CL Command List > CRTDDMF Reference
Description:
The Create Distributed Data Management File (CRTDDMF) command creates a distributed data management (DDM) file.
A DDM file is used as a reference file to access a file located on a remote (target) system in the distributed data management network. The DDM file on the local system contains the name of the remote file and information identifying the remote system. It also specifies the method used to access the records in the remote file.
Examples:
The following examples describe the creation of a DDM file.
Example 1: Creating a DDM File to Access a File at Another iSeries 400
CRTDDMF FILE(SOURCE/SALES) RMTFILE(REMOTE/SALES)
RMTLOCNAME(NEWYORK)
This command creates a DDM file named SALES, and stores it in the SOURCE library on the source system. This DDM file uses the remote location named NEWYORK to access a remote file named SALES stored in the REMOTE library on an iSeries 400 in New York.
Example 2: Creating a DDM File to Access a File Member at Another IBM iSeries 400
CRTDDMF FILE(SOURCE/SALES) RMTLOCNAME(NEWYORK)
RMTFILE(*NONSTD ¡¯REMOTE/SALES(APRIL)¡¯)
This command creates the same file as in the previous example, except that now it accesses a specific member in the remote SALES file; the member is named APRIL.
Example 3: Creating a DDM File to Access a File on a System/38
CRTDDMF FILE(OTHER/SALES) RMTLOCNAME(CHICAGO)
RMTFILE(*NONSTD ¡¯PAYROLL.REMOTE¡¯)
This command creates a DDM file named SALES, and stores it in the library OTHER on the source system. The remote location CHICAGO is used by the DDM file to access a remote file named PAYROLL in library REMOTE on a System/38.
Example 4: Creating a DDM File to Access a File on a System/36
CRTDDMF FILE(OTHER/SALES) RMTFILE(PAYROLL)
RMTLOCNAME(DENVER) LVLCHK(*NO)
This command creates a DDM file named SALES, and stores it in the library OTHER on the source system. The remote location DENVER is used by the DDM file to access a remote file named PAYROLL on a System/36 in Denver. No level checking is performed between the PAYROLL file and the application programs that access it. Because the ACCMTH parameter was not specified, the access method for the target system is selected by the source system when the DDM file is opened to access the remote file.
Example 5: Creating a DDM File to Access a File through TCP/IP
CRTDDMF FILE(OTHER/SALES) RMTFILE(PAYROLL)
RMTLOCNAME(ROCHESTER.XYZ.COM *IP) PORT(*DRDA)
This command creates a DDM file named SALES, and stores it in the library OTHER on the source system. The remote location ROCHESTER.XYZ.COM is used by the DDM file to access a remote file named PAYROLL on a TCP/IP host with the domain name of ROCHESTER.XYZ.COM. The host listens on the standard DRDA port of 446. (Since *DRDA is the default port, the PORT parameter is not actually neccessary in this case.)
Example 6: Creating a DDM File to Access a File through TCP/IP using dotted decimal IP address and a numeric port number
CRTDDMF FILE(OTHER/SALES) RMTFILE(PAYROLL)
RMTLOCNAME(¡¯9.5.36.17¡¯ *IP) PORT(5021)
This command creates a DDM file named SALES, and stores it in the library OTHER on the source system. The remote location 9.5.36.17 is used by the DDM file to access a remote file named PAYROLL on a TCP/IP host with an IP address of 9.5.36.17. The host listens on port 5021.