CL Command Reference - CHGTCPHTE
CL Command List > CHGTCPHTE Reference
Description:
The Change TCP/IP Host Table Entry (CHGTCPHTE) command is used to change the host names and text description fields for an existing host table entry in the local host table. A host table entry consists of one internet address, up to four host names, and one text description.
The CHGTCPHTE command can change a minimum of zero and a maximum of four host names associated with a specific internet address. This command can also be used to add or remove a host-name value associated with a specific internet address. To remove a host-name value, specify *BLANK as the host name. Setting all the host names for a host table entry to *BLANK is not allowed.
If the CHGTCPHTE command is prompted with an internet address specified, the current host names and text description for the host table entry associated with that internet address are displayed in the appropriate prompt fields.
If a remote name server is being used by your local system, the search order used (whether the remote name server or local host table is searched first) for a resolution between a host name and an internet address depends on how the searched-first value was configured on the configuration panel of the remote name server. To change the search order, use option 13 on the Configure TCP/IP (CFGTCP) command.
The TCP/IP host table is shipped with the loopback entry. This entry has an internet address of 127.0.0.1 and two host names: LOOPBACK and LOCALHOST. The loopback host name can be associated only with an internet address that has a first-byte value equal to 127.
Restrictions:
. You must have input/output system configuration (*IOSYSCFG) special authority to run this command.
Examples:
Example 1: Changing a Host Name
CHGTCPHTE INTNETADR(¡¯132.28.71.5¡¯)
HOSTNAME((*SAME) (*SAME) (NEWAS400HOST))
TEXT(*BLANK)
This command changes the third host name associated with internet address 132.28.71.5 to NEWAS400HOST but does not modify the first, second, or fourth host names. The text of the descriptive comment for this host table entry is set to blanks.
Example 2: Changing All Host Names
CHGTCPHTE INTNETADR(¡¯9.130.25.21¡¯)
HOSTNAME((MYHOST)(MYHOST.MYNET)
(MYHOST.MYNET.MYCORP)
(MYHOST.MYNET.MYCORP.MYFIELD))
TEXT(*SAME)
This command changes all host names associated with internet address 121.14.32.5. The first host name is specified in the short form, MYHOST. The fourth host name is specified in the fully qualified form, MYHOST.MYNET.MYCORP.MYFIELD. The descriptive comment for this host table entry is not changed.
Example 3: Changing Host Names and Text Description
CHGTCPHTE INTNETADR(¡¯132.28.71.5¡¯)
HOSTNAME((AS400ETH.SALES.ABC.COM)
(AS400ETH.SALES.ABC) (*BLANK) (*BLANK))
TEXT(¡¯THIS ENTRY UPDATED ON 19 FEB 1994 BY T.J.¡¯)
This command changes the first and second host names associated with internet address 132.28.71.5 to AS400ETH.SALES.ABC.COM and AS400ETH.SALES.ABC. The third and fourth host names, if they existed, are changed to blanks. The descriptive comment for this host table entry is changed to ¡¯THIS ENTRY UPDATED ON 19 FEB 1994 BY T.J.¡¯.