Where allowed to run: All environments (*ALL) Threadsafe: No |
Parameters Examples Error messages |
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.
Top |
Keyword | Description | Choices | Notes |
---|---|---|---|
FILE | DDM file | Qualified object name | Required, Positional 1 |
Qualifier 1: DDM file | Name | ||
Qualifier 2: Library | Name, *CURLIB | ||
RMTFILE | Remote file | Element list | Required, Positional 2 |
Element 1: File |
Single values: *NONSTD Other values: Qualified object name |
||
Qualifier 1: File | Name | ||
Qualifier 2: Library | Name, *LIBL, *CURLIB | ||
Element 2: Nonstandard file 'name' | Character value | ||
RMTLOCNAME | Remote location | Single values: *RDB Other values: Element list |
Required, Positional 3 |
Element 1: Name or address | Character value | ||
Element 2: Type | *SNA, *IP | ||
RDB | Relational database | Name | Optional |
TEXT | Text 'description' | Character value, *BLANK | Optional |
DEV | Device | Element list | Optional |
Element 1: APPC device description | Name, *LOC | ||
LCLLOCNAME | Local location | Communications name, *LOC, *NETATR | Optional |
MODE | Mode | Communications name, *NETATR | Optional |
RMTNETID | Remote network identifier | Communications name, *LOC, *NETATR, *NONE | Optional |
PORT | Port number | 1-65535, *DRDA | Optional |
ACCMTH | Access method | Single values: *RMTFILE, *COMBINED Other values: Element list |
Optional |
Element 1: Remote file attribute | *KEYED, *ARRIVAL | ||
Element 2: Local access method | *BOTH, *RANDOM, *SEQUENTIAL | ||
SHARE | Share open data path | *NO, *YES | Optional |
PTCCNV | Protected conversation | *NO, *YES | Optional |
LVLCHK | Record format level check | *RMTFILE, *NO | Optional |
AUT | Authority | Name, *LIBCRTAUT, *ALL, *CHANGE, *EXCLUDE, *USE | Optional |
REPLACE | Replace file | *YES, *NO | Optional |
Top |
Specifies the DDM file to be created.
This is a required parameter.
Qualifier 1: DDM file
Qualifier 2: Library
Top |
Specifies the name of the remote file as it is coded on the target system. This file name must be specified in code page 500. The remote file does not need to exist when the Distributed Data Management (DDM) file is created.
This is a required parameter.
Element 1: File
Single values
Qualifier 1: File
Qualifier 2: Library
Note: The library name is used only if the target system is an iSeries system. If *CURLIB is specified, the current library in the called job on the target system is searched to locate the file. If *LIBL is specified, the library list in the called job on the target system is searched to locate the file.
Element 2: Nonstandard file 'name'
Names for the iSeries system, System/38, and System/36 must be in uppercase, and no blanks are allowed.
If the target system is an iSeries system or a System/38, a file name, library name, and member name can all be specified. If a member name is specified, the full file name must be enclosed in apostrophes and must follow the value *NONSTD, and the member name must be enclosed in parentheses and immediately follow (with no space) either the library name (System/38) or the file name (iSeries).
Top |
Specifies the remote (target) system location name or address used with the distributed data management (DDM) file. The remote location name or address does not have to be defined before the DDM file is created, but it must be defined before the DDM file is opened. Multiple DDM files can use the same remote location for the target system.
This is a required parameter.
Single values
Element 1: Name or address
If *IP is specified for the address type, the DDM server at the remote location must support the use of TCP/IP, and the DEV, LCLLOCNAME, RMTNETID, and MODE parameters will be ignored.
If *IP is not specified, the DDM server must support SNA connectivity, and the PORT parameter will be ignored.
Element 2: Type
More information on remote locations is in the APPC Programming book, SC41-5443.
Top |
Specifies the relational database entry that is used to determine the remote location information for the DDM file.
Top |
Specifies the text that briefly describes the object.
Top |
Specifies the name of the source system communications device that is used with this distributed data management (DDM) file.
This parameter will be ignored if *IP is specified for the Remote location (RMTLOCNAME) parameter.
Top |
Specifies the local location name.
This parameter will be ignored if *IP is specified for the Remote location (RMTLOCNAME) parameter.
More information on local location names is in the APPC Programming book, SC41-5443.
Top |
Specifies the mode name that is used with the remote location name to communicate with the remote (target) system.
This parameter will be ignored if *IP is specified for the Remote location (RMTLOCNAME) parameter.
More information on mode names is in the APPC Programming book, SC41-5443.
Top |
Specifies the identifier (ID) of the remote network in which the remote location resides. That ID is used to communicate with the remote (target) system.
If this parameter is specified, the Remote location (RMTLOCNAME) parameter must be consistent with this RMTNETID parameter. If the RMTLOCNAME parameter specified a network ID, this parameter must agree (otherwise, an error message will be issued). If the RMTLOCNAME parameter does not specify any network ID, there is no possibility of conflict with this parameter.
This parameter will be ignored if *IP is specified for the RMTLOCNAME parameter.
More information on remote network IDs is in the APPC Programming book, SC41-5443.
Top |
Specifies the TCP/IP port that is used at the remote location to communicate with the system on which the remote file is located.
This parameter will be ignored if *SNA is specified for the Remote location (RMTLOCNAME) parameter.
Top |
Specifies the DDM access method used to open the remote file and access its records. This parameter is ignored if the remote (target) system is a System/38 or an iSeries system.
Element 1: Remote file attribute
Element 2: Local access method
Determining the Access Method
The two elements of this parameter indicate the access method to be used to access the remote file. The following table shows the combinations of values for the ACCMTH parameter. The remote file attributes (in the far left column) refer to the type of file on the target system. The local access method (in the last three columns) refers to the way in which the source iSeries program intends to access the records in the remote file.
Remote Local Access Method File Attributes *SEQUENTIAL *RANDOM *BOTH ---------- ------------ ------------ ------------ *ARRIVAL Relative by Random by Combined by record number record number record number *KEYED Relative by Random by Combined by key key key |
Top |
Specifies whether the open data path (ODP) is shared with other programs in the same routing step. When an ODP is shared, the programs accessing the file share facilities such as the file status and the buffer.
Top |
Specifies whether the DDM conversation that is started for the DDM file is a protected conversation or not. A protected conversation is a conversation that uses two-phase commit protocols to ensure, even if a failure occurs, updates made on the remote system are synchronized with updates to other remote or local resources. A protected conversation is required to use two-phase commitment control with DDM. More information on using two-phase commitment control with DDM is in the Distributed Data Management information in the iSeries Information Center at http://www.ibm.com/eserver/iseries/infocenter. PTCCNV(*NO) must be specified if *IP is specified for the Remote location (RMTLOCNAME) parameter.
Top |
Specifies whether the level identifiers of the record formats in the remote file are checked when the DDM file is opened by a program. If so, the record format identifiers in the program must match those in the remote file. If they do not match, an error message is sent to the requesting program and neither the DDM file nor the associated remote file is opened. Files that have an error while being opened are automatically closed. This parameter can be overridden by an Override with Database File (OVRDBF) command before the remote file is opened.
If the target system is not an iSeries system and not a System/38, the source iSeries system creates a level check value based on the record length of the remote file and any key fields used in it. The created values are then compared to the values in the program, and they must match before the remote file can be opened. This reduces the chances of the wrong file being selected.
Note: Before this can be done for a system other than an iSeries system or a System/38, the program must be compiled (or recompiled) using the DDM file. During the compilation, the DDM file is used to establish communications with the target system, get the remote file's attributes from the target system, and generate the level identifier values so they can be included in the compiled program for later level checking.
Top |
Specifies the authority you are giving to users who do not have specific authority for the object, who are not on an authorization list, and whose group profile or supplemental group profiles do not have specific authority for the object.
Note: On the target system, the authority needed to access the remote file is also checked by using the user profile of the started job on the target system.
Top |
Specifies whether an existing file, other than a save or database file, is replaced.
Top |
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.
Top |
Top |