| Where allowed to run: All environments (*ALL) Threadsafe: No |
Parameters Examples Error messages |
The Change TCP/IP Host Table Entry (CHGTCPHTE) command is used to change the host names and text description field for an existing host table entry in the local host table. A host table entry consists of one internet address, up to 65 host names, and a text description field.
See also the following host table commands:
The CHGTCPHTE command can change a minimum of zero and a maximum of 65 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 system for resolving a host name or an internet address, the choice to first search the remote name server or the local host table depends on the setting of the host name search priority (HOSTSCHPTY) parameter on the Change TCP/IP Domain (CHGTCPDMN) command. To change the host name search priority use the CHGTCPDMN command or use the Configure TCP/IP (CFGTCP) command and select option 12.
The TCP/IP host table is shipped with two loopback entries -- one for IPv4 and one for IPv6. The IPv4 entry has an internet address of 127.0.0.1 and two host names: LOOPBACK and LOCALHOST. The LOOPBACK host name can only be associated with an internet address that has a first-byte value equal to 127. The IPv6 entry has an internet address of ::1 and two host names: IPV6-LOOPBACK and IPV6-LOCALHOST. The IPV6-LOOPBACK host name can only be associated with the IPv6 internet address ::1. The IPV6-LOCALHOST host name can only be associated with an IPv6 internet address.
APPC over TCP/IP (AnyNet) uses the host name to map location names to internet addresses. The host name must be in the form:
location.netid.SNA.IBM.COM
Where location is the remote location the program is opening to, and netid is the network identifier for this connection. SNA.IBM.COM is the qualifier that designates this as the APPC over TCP/IP domain.
Location names support characters that cannot be present in host names (for example: $ (dollar), @ (at sign), and # (number sign)). Therefore, the APPC application can open only to locations that fulfill the TCP/IP host name syntax. This limits location names used for APPC over TCP/IP to the characters A-Z (uppercase and lowercase) and 0-9.
Restrictions:
| Top |
| Keyword | Description | Choices | Notes |
|---|---|---|---|
| INTNETADR | Internet address | Character value | Required, Key, Positional 1 |
| HOSTNAME | Host names | Values (up to 65 repetitions): Element list | Optional |
| Element 1: Name | Character value, *SAME, *BLANK | ||
| TEXT | Text 'description' | Character value, *SAME, *BLANK | Optional |
| Top |
Specifies the internet address associated with the host name (or names) or the text description field that is to be changed in the local host table.
An IPv4 internet address is specified in the form nnn.nnn.nnn.nnn, where nnn is a decimal number ranging from 0 through 255. An IPv4 internet address is not valid if it has a value of all binary ones or all binary zeros for the network identifier (ID) portion or the host ID portion of the address.
An IPv6 internet address is specified in the form x:x:x:x:x:x:x:x, where x is a hexadecimal number ranging from 0 through X'FFFF'. "::" may be used once in the IPv6 address to indicate one or more groups of 16 bits of zeros. The "::" may be used to compress leading, imbedded, or trailing zeros in the address.
An IPv4-mapped IPv6 address may be specified. An IPv4-mapped IPv6 address is specified in the form ::FFFF:nnn.nnn.nnn.nnn, where nnn is a decimal number ranging from 0 through 255.
If the internet address is entered from a command line, the address must be enclosed in apostrophes.
This is a required parameter.
| Top |
Specifies the host names corresponding to the internet address. The host name can be either the short form or the full domain version of the name. A common practice is to define one short name that is unique within your local network and to also define the full domain version of the host name that is unique within the Internet.
A host name is a text string that has 1 to 255 characters. Host names consist of one or more labels separated by periods. Each label can contain up to 63 characters. The first character of each label must be an alphabetical character or a digit. The last character of each label must be an alphabetical character, a digit, or a period. The following characters are allowed in host names:
Note: These characters are part of the Syntactic/Invariant Character Set (character set number 640).
Other domain name and host name conventions include the following:
The COM designation is one of several domain names used by convention when connecting to the internet. Some of the other domain names that follow this convention are:
You can specify 65 values for this parameter.
Note: If *SAME is specified and no other host name values are specified, all of the host name values remain the same. If a host table entry has more than one host name identified and if the first host name is specified but no other element values are specified, the remaining host names are not changed.
location.netid.SNA.IBM.COM
| Top |
Specifies text that briefly describes the host table entry.
| Top |
Example 1: Changing a Host Name
CHGTCPHTE INTNETADR('132.28.71.5')
HOSTNAME((*SAME) (*SAME) (*SAME) (*SAME) (NEWHOST))
TEXT(*BLANK)
This command changes only the fifth host name associated with internet address 132.28.71.5 to NEWHOST -- none of the other host names associated with the internet address are changed. If any of the host names 1-4 do not currently exist, NEWHOST will move up in the host name list. For example, if host names 3 and 4 do not exist, NEWHOST becomes the third host name. The text description for this host table entry is set to blanks.
Example 2: Changing More Than One Host Name
CHGTCPHTE INTNETADR('9.130.25.21')
HOSTNAME((MYHOST) (MYHOST.MYNET)
(MYHOST.MYNET.MYCORP)
(MYHOST.MYNET.MYCORP.MYFIELD)
(MYHOST2)
(MYHOST3))
TEXT(*SAME)
This command changes the first six host names associated with internet address 9.130.25.21. The first, fifth, and sixth host names are specified in the short form -- MYHOST, MYHOST2, and MYHOST3, respectively. The fourth host name is specified in the fully qualified form, MYHOST.MYNET.MYCORP.MYFIELD. The text description for this host table entry is not changed.
Example 3: Changing Host Names and Text Description
CHGTCPHTE INTNETADR('1234::5678')
HOSTNAME((MYETHERNET.SALES.ABC.COM)
(MYETHERNET.SALES.ABC) (*BLANK) (*BLANK))
TEXT('THIS ENTRY UPDATED BY T.J.')
This command changes the first and second host names associated with internet address 1234::5678 to MYETHERNET.SALES.ABC.COM and MYETHERNET.SALES.ABC. The third and fourth host names are changed to blanks. If more than four host names are currently associated with the host table entry, those host names move up in the host name list by two positions, since the current third and fourth entries are now blank. The text description for this host table entry is changed to 'THIS ENTRY UPDATED BY T.J.'.
| Top |
*ESCAPE Messages
| Top |