The HOSTNAME (Hostname) command either displays the current host name of the system or establishes a new host name at the time of the next halt/load.
Each host in a BNA network is identified by a host name. This name identifies the location of a resource (for example, a file) to which access is desired. No two systems in the network can have the same host name at the same time. Each host must have a host name assigned before it tries to establish communication with a remote host.
Syntax

Explanation
HOSTNAME
HN
Display the current host name and the host names of any BNA hosts that have active dialogues. When port communications are established with a host for the first time, the remote host name is added to the displayed list.
Hosts not listed can still be accessed. When port communications are successful, the host names are added to the list.
HOSTNAME = <hostname>
HN = <hostname>
Specify the new host name to be established at the time of the next halt/load. A valid host name contains from 1 to 17 alphanumeric characters and must begin with a letter.
HN −
Specifies that the current name of the system is removed after the next halt/load. After you enter this form of the command, the system displays the following message:
HOSTNAME WILL BE UNSPECIFIED AFTER NEXT HALT/LOAD.
If BNA is running, the system displays the following message:
HOSTNAME CANNOT BE REMOVED WHEN BNAV2 IS AVAILABLE
HOSTNAME Command When BNA Is Running
When BNA is running, the MCP changes the HOSTNAME command to "NW HOSTNAME = <new name>", changes the usercode to be the host usercode, and sends the command to the BNA operations interface for processing.
The BNA security mechanism is different from the MCP security mechanism. The HOSTNAME command succeeds only if the system host usercode is authorized as a SECURITY network user (which requires an appropriate NW AUTHORIZE command).
For information on the NW AUTHORIZE command, refer to the Networking Commands and Inquiries Help.
Examples
Example 1
HOSTNAME
HOSTNAME: BLUE
Example 2
HN = HOST
LOCAL HOSTNAME IS: TRPROGD HOSTNAME WILL BE >>HOSTC<< AFTER NEXT HALT/LOAD