You can use the Jython or Jacl scripting languages to manage
servers with the wsadmin tool. Use the command and parameters in the
NodeConfigCommands group to change the host name of a node.
The Utility command group for the AdminTask object includes the
following commands:
changeHostName
Use the changeHostName command
to change the host name of a node.
Target
object
None
Required parameters
- -hostName
- The new host name. (String, required)
- -nodeName
- The name of the node whose host name will be changed. (String,
required)
Optional
parameter
- -systemName
- The name of the z/OS system on which this node will run. This
field is only required if a node is to be moved from one system to
another, for example, form system SYSA to system SYSB. If you are
not sure of the value you should specify for this parameter, issue
the IPLINFO command on your z/OS system, and use the name that displays
in the Sysname= field as the value for this
parameter.
Note: When you run the changeHostName
command interactively, the systemName parameter appears, but is only
to be used for a z/OS system. The systemName parameter represents
the z/OS system name that is defined in the server.xml file
as a value for property, was.ConfiguredSystemName.
When the systemName parameter is selected, this property is changed.
Examples
Batch
mode example usage:
Using Jacl:
$AdminTask changeHostName {-hostName myHost -nodeName myNode -systemName mySystem}
Using Jython string:
AdminTask.changeHostName('-hostName myHost -nodeName myNode -systemName mySystem')
Using Jython list:
AdminTask.changeHostName(['-hostName', 'myHost', '-nodeName', 'myNode', '-systemName', 'mySystem'])
Interactive mode example usage:
Using Jacl:
$AdminTask changeHostName {-interactive}
Using Jython:
AdminTask.changeHostName('-interactive')