InfoCenter Home >
6: Administer applications >
6.6: Tools and resources quick reference >
6.6.0: About user assistance >
6.6.0.2: Command line administration >
6.6.0.2.2: WebSphere Control Program (wscp) >
6.6.0.2.2.4: Example wscp commands, procedures, and scripts >
6.6.0.2.2.4.1: Initialization and general-purpose procedures
6.6.0.2.2.4.1: Initialization and general-purpose procedures
The init.tcl script initializes variables used elsewhere in the
examples. Note that init.tcl was used for a specific test suite,
but it contains several procedures that can be generally useful. If you
are writing scripts that must accept some common command-line arguments, you
can use or add to the predefined variables as needed. The contents of
init.tcl are as follows:
- getAttrs and setAttrs. Procedures that get and set an array of
attributes for a specified object.
- getProperty. Procedure that retrieves a specified system property,
such as the operating system name and operating system-specific file
separator.
- which. Procedure that provides the Tcl equivalent of the
corresponding UNIX command. Retrieves the path to the specified
argument (must be an executable) on java.library.path.
- parseArguments. Sets global variables for the host name, host
internet address, and node. Also sets the VERBOSE global
variable. If VERBOSE is set to 1, the wscp command being
executed is echoed to the screen.
- initConstants. Sets up lists or arrays of lists for wscp
commands, operations, actions, and status values. Also sets the
location of home directories for WebSphere Application Server, DB2, the IBM
Debugger; the port number of the administrative server; and other
miscellaneous information.
- statusToString. Translates a specified wscp status to
its corresponding string equivalent, or if called with no arguments,
translates the current value of $errorCode.
- checkStatus. Tests whether the expected status matches the
specified status, or as in the previous item, the current value of $errorCode
if no status argument is provided.
The init.tcl script uses the global variable VERBOSE to echo the
wscp commands as they are being executed. To set this
variable to true, specify 1 as the value of the -verbose option when running
wscp.bat.
C:\> wscp -verbose 1
The init.tcl script is available in 6.6.0.2.2.5: Sample Tcl procedures and scripts.
|
|