Where allowed to run: All environments (*ALL) Threadsafe: No |
Parameters Examples Error messages |
The Merge TCP/IP Host Table (MRGTCPHT) command is used to merge host names, internet addresses, and text comment entries from a physical file member into the local host table. A replace option is also provided that allows the entire local host table to be replaced by the host table entries in a user specified physical file member.
A file format option is provided that allows either *AS400, *AIX, or *NIC file format to be merged with the local host table. The local host table is located in member QUSRSYS/QATOCHOST.HOSTS and is created as a physical file.
A maximum of 4 host names per IP address is allowed when host tables are merged. For example: If the local host table already has 3 host names and the physical file member to be merged has 2 additional host names, only the first host name in the physical file is merged into the final host table. Host names that exist both in the local host table and the physical file member being merged are not duplicated.
Attention: The original copy of the local host table is not saved by the Merge TCP/IP Host Table (MRGTCPHT) command. To save the original host table, create a copy of the file QUSRSYS/QATOCHOST.HOSTS using the Copy File (CPYF) command. Do this before issuing the MRGTCPHT command.
Restrictions:
Top |
Keyword | Description | Choices | Notes |
---|---|---|---|
FROMFILE | From file | Qualified object name | Required, Positional 1 |
Qualifier 1: From file | Name | ||
Qualifier 2: Library | Name, *LIBL, *CURLIB | ||
FROMMBR | From member | Name, *FIRST, *LAST | Optional, Positional 2 |
FILEFMT | File format | *AS400, *AIX, *NIC | Optional |
REPLACE | Replace host table | *NO, *YES | Optional |
Top |
Specifies the physical file that contains the member being used for the merge operation.
Qualifier 1: From file
Qualifier 2: Library
Top |
Specifies the physical file member to be used in the merge operation.
Top |
Specifies the format of the physical file member to be merged with the local host table.
Note: *AS400 can only be used if the physical file member specified is a host table from an iSeries running Version 3, Release 1, Modification 0 (V3R1M0) or later of OS/400. If you import a host table from a system running any version of OS/400 prior to V3R1M0, specify *AIX.
Top |
Specifies whether the physical file member is to be merged with or replaces the local host table.
Top |
Example 1: Replacing Local Host Table
MRGTCPHT FROMFILE(AS400FILE) REPLACE(*YES) FILEFMT(*AS400)
This command replaces the contents of QUSRSYS/QATOCHOST.HOSTS with the contents of the first member of physical file AS400FILE. The first member of physical file AS400FILE is in *AS400 host table format.
Example 2: Merging Local Host Table
MRGTCPHT FROMFILE(HOSTLIB/NICFILE) FROMMBR(NEWHOSTS) FILEFMT(*NIC)
This command merges the current contents of the local host table with the contents of the NEWHOSTS member of physical file NICFILE in library HOSTLIB. The physical file is in *NIC format. The records are converted from *NIC format to *AS400 format by this command.
Top |
*ESCAPE Messages
Top |