Merge TCP/IP Host Table (MRGTCPHT)

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

Parameters

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

From file (FROMFILE)

Specifies the physical file that contains the member being used for the merge operation.

This is a required parameter.

Qualifier 1: From file

name
Specify the name of the physical file.

Qualifier 2: Library

*LIBL
All libraries in the job's library list are searched.
*CURLIB
The current library for the job is searched. If no library is specified as the current library for the job, the QGPL library is used.
name
Specify the name of the library where the physical file is located.
Top

From member (FROMMBR)

Specifies the physical file member to be used in the merge operation.

*FIRST
The first member of the physical file is used to merge with the host table.
*LAST
The last member of the physical file is used to merge with the host table.
name
Specify the name of the physical file member to be used.
Top

File format (FILEFMT)

Specifies the format of the physical file member to be merged with the local host table.

*AS400
The physical file member to be merged with the local host table is *AS400 format.

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.

*OPSYS
The physical file member to be merged with the local host table is *OPSYS format. *OPSYS format is used for a physical file member produced by the Copy TCP/IP Host Table (CPYTCPHT) command. This value must be used if the physical file member is from a system running Version 6 Release 1 Modification 0 (V6R1M0) or later of the operating system.
*AIX
The physical file member to be merged with the local host table is *AIX format.

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.

*NIC
The physical file member to be merged with the local host table is *NIC format.

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

Replace host table (REPLACE)

Specifies whether the physical file member is to be merged with or replaces the local host table.

*NO
The physical file member is merged with the local host table.
*YES
The physical file member replaces the local host table.
Top

Examples

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

Error messages

*ESCAPE Messages

TCP1927
Records of file &1, member &2 not valid.
TCP1929
Host table not available.
TCP1934
Merge file &1, member &3, in library &2 not found.
TCP8050
*IOSYSCFG authority required to use &1.
Top