Operating System - OpenVMS
1752557 Members
4356 Online
108788 Solutions
New Discussion юеВ

Re: editing ucx$host.dat

 
Atul Subhedar
Occasional Advisor

editing ucx$host.dat

I want to add new entry of the server and ipaddres on vms server. I want to know how I can edit ucx$host.dat file which is having such entries . I suppose this file is same as /etc/hosts in unix.

Please advice.

Atul
5 REPLIES 5
Jon Pinkley
Honored Contributor

Re: editing ucx$host.dat

use

$ tcpip set host dns_name /address=a.b.c.d

or if prio to tcpip services

$ ucx set host dns_name /address=a.b.c.d

it depends
Hoff
Honored Contributor

Re: editing ucx$host.dat

and to get rid of entries:

set nohost [mumble]

don't map knowledge of unix onto vms, as that will often lead to frustration -- the manuals are usually pretty good, and will walk you through the typical tasks.

http://www.hp.com/go/openvms/doc/

[Moderator edit: Above link is no longer valid. Please refer to https://support.hpe.com/]

has the tcp/ip services manuals (your version is prior to v5.0), and the OpenVMS manuals, and many other product manuals.

Hein van den Heuvel
Honored Contributor

Re: editing ucx$host.dat

As stated, use the tools, do not try direct manipulation. If you want to know why, then just a few sample records with DUMP/RECORD=COUNT=5
You'll see some bytes with binary / non-print characters indentifying fields. That make editting tricky.

Cheers.
Hein.
Andreas Vollmer
Valued Contributor

Re: editing ucx$host.dat

Hi Atul,
Here are some practical related hints.
Anyhow please be careful these are only hints. The here listed commands applies for HP TCP/IP Services V5.4, V5.5 & V5.6
But no guarranties!

Examples
========

View HOSTS.DAT entries
----------------------
TCPIP SHOW HOST /LOCAL

Removing entries out of the HOSTS.DAT
-------------------------------------
TCPIP SET NOHOST /NOCONFIRM 192.168.100.127

Adding HOSTS.DAT entries
------------------------
$ TCPIP SET HOST lagavulin /ADDRESS=192.168.1.22 /ALIAS=("lagavulin")

As mentioned before please refer to the documentation or online help (man pages).
TCPIP help
set host

Regards
Andreas
OpenVMS Forever!
Andreas Vollmer
Valued Contributor

Re: editing ucx$host.dat

Hi again,
I forget to mention...
Please never ever try to edit the HOSTS.dat file or any other TCPIP (UCX) database files.
As Hein mentioned these files have a special file format. Editing will lead to data corruption within the TCPIP config DB and cause unpredictable behavior of TCPIP!

The HOSTS.DAT is not a plain ASCII file as it is under UNIX/LINUX etc.

BR
Andreas
OpenVMS Forever!