| 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 files in either *AS400, *OPSYS, *AIX, or *NIC file formats to be merged with the local host table.
A maximum of 65 host names per IP address is allowed when host tables are merged. For example: If the local host table already has 64 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 current copy of the local host table is not saved by the MRGTCPHT command. To save the current host table, use the Copy TCP/IP Host Table (CPYTCPHT) 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, *OPSYS, *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.
This is a required parameter.
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 a system running Version 3 Release 1 Modification 0 (V3R1M0) through Version 5 Release 4 Modification 0 (V5R4M0) of the operating system. If you import a host table from a system running any operating system version prior to V3R1M0, specify *AIX.
If the physical file member is in *AS400 format, only host table entries containing IPv4 addresses will be merged or replaced, and any entries currently in the host table that contain IPv6 addresses will be unchanged.
Note: If the physical file member is in *AIX format, only host table entries containing IPv4 addresses will be merged or replaced, and any entries currently in the host table that contain IPv6 addresses will be unchanged.
Note: If the physical file member is in *NIC format, only host table entries containing IPv4 addresses will be merged or replaced, and any entries currently in the host table that contain IPv6 addresses will be unchanged.
| 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(HOSTFILE) REPLACE(*YES) FILEFMT(*OPSYS)
This command replaces the contents of the host table with the contents of the first member of physical file HOSTFILE. The first member of physical file HOSTFILE is in *OPSYS 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 |