The original copy of the local host table is not saved by the MRGTCPHT (Merge
TCP/IP Host Table) command. To save the original host table, create a copy of the
file QUSRSYS/QATOCHOST.HOSTS by using the Copy File (CPYF) command. Do
this before issuing the MRGTCPHT command.
Merging TCP/IP Host Tables
You can use imported host tables in two ways:
v Overwrite the current host table. To do this, specify Replace Host Table (*Yes)
on the Merge Host Table display.
v Merge the information of the imported host table with the information that was
entered by using option 10 (Work with TCP/IP host table entries) from the
Configure TCP/IP menu. To merge the information, specify Replace Host Table
(*No) on the Merge Host Table display.
You can merge an imported host table with the local host table while TCP/IP is
running by using the CFGTCP (Configure TCP/IP) command. The changes take
affect the next time a TCP/IP application accesses the host table.
Select option 11 to merge an imported host table with the local AS/400 host table.
You can also use the Merge TCP/IP Host Table (MRGTCPHT) command from any
command line.
Example: Successful Host Table Merge
The following example shows the command to merge an imported host table with
the local host table.
MRGTCPHT FROMFILE(QUSRSYS/M02HOSTS) FILEFMT(*AS400) REPLACE(*NO)
File M02HOSTS, member *FIRST, successfully merged with host
table.
Example: Partly Successful Host Table Merge
The following example shows the command to merge an imported host table with
the local host table.
MRGTCPHT FROMFILE(QUSRSYS/M03HOSTS) FILEFMT(*AS400) REPLACE(*NO)
Duplicate host name SPARKY.SYSNAM123.IBM.COM at address 9.4.6.138
found host table.
Duplicate host name MVAX.SYSNAM123.IBM.COM at address 9.4.6.252
found host table.
File M03HOSTS, member *FIRST, merged with host table: however,
error occurred.
In this example, the host table contains entries with the same host name, which
shows in the message as duplicate host names.
Managing the Host Table from a Central Site
If your network has multiple AS/400 systems, you can define the TCP/IP host table
on one system and share that table with the other systems. This saves you the
effort of having to define the host table on each system. To do this, follow these
steps:
Chapter 3. TCP/IP: Operation, Management, and Advanced Topics 75