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 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.
See also the following host table commands:
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.
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 4 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. The internet address is specified in the form nnn.nnn.nnn.nnn, where nnn is a decimal number ranging from 0 through 255. An 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. If the internet address is entered from a command line, the address must be enclosed in apostrophes.
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. Specify from 1 to 4 different host names to be associated with the internet address. Host names may be up to 255 characters in length.
A domain name or a host name can be a text string having 1 to 255 characters. Domain 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 alphabetic character or a digit. The last character of each label must be an alphabetic character, a digit, or a period. The following characters are allowed in domain names:
Note: These characters are part of the Syntactic Character Set (character set number 640). This character set is also commonly referred to as invariant.
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:
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 a comment associated with this host table entry.
Note: If the host table will be copied to a system using a different code page than the system it was created on, it is suggested that you avoid using certain characters in a comment. Host table entry comments will be more portable if they are limited to characters in the Syntactic Character Set (invariant).
Top |
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.'.
Top |
*ESCAPE Messages
Top |