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.3: Advanced usage of wscp >
6.6.0.2.2.3.14: Where to find more information about Tcl
6.6.0.2.2.3.14: Where to find more information about Tcl
The following are some useful Tcl commands for writing wscp
scripts. For additional information on Tcl, refer to Tcl and the
TK Toolkit by John K. Ousterhout (Addison Wesley), or to the Tcl
developer Web site at http://www.scriptics.com.
- set. Creates, reads, and modifies variables.
set serv "/Node:dev-pc/ApplicationServer:myAppServer/"
- eval. Accepts any number of arguments, concatenates them
with separator spaces, then executes the result as a Tcl script. One
use of eval is for generating commands, saving them in variables,
and then later evaluating the variables as Tcl scripts.
set cmd {ApplicationServer stop /Node:MyNode/ApplicationServer:MyServer/}
. . .
eval $cmd
- exec. Creates one or more new processes and waits until
they are complete before returning. Looks for an executable file in the
working directory or uses the PATH environment variable.
exec date
- global. Makes global variables available inside a
procedure.
global errorCode
- lappend. Appends new elements to a list stored in a
variable.
set vars {value1 value2 value3}
value1 value2 value3
lappend vars value4
value1 value2 value3 value4
- lindex. Extracts an element from a list.
lindex $vars 2
value3
- lreplace. Deletes elements from a list and optionally
adds new elements. The first argument is a list, and the second and
third arguments are the indices of the first and last elements to be
deleted.
lreplace $vars 1 2
value1 value4
- lsearch. Searches a list for an element with a
particular pattern and returns the index of the first matching element that is
found.
lsearch $vars value4
3
- proc. Creates a named procedure and assigns a list of
arguments to be used with that procedure.
proc checkStatus {expectedStatus}
proc getAttrs {name array args}
|
 |
 |
Related topics |
|
| Home (Getting started page) |
|
Peer topics |
|
| 6.6.0.2.2.3.1: Using abbreviations in wscp commands |
|
| 6.6.0.2.2.3.2: Specifying lists in wscp commands |
|
| 6.6.0.2.2.3.3: Example use of wscp and Tcl |
|
| 6.6.0.2.2.3.4: Using wscp and operating system commands |
|
| 6.6.0.2.2.3.5: Obtaining status and error information |
|
| 6.6.0.2.2.3.6: Use of qualified home names in the administrative server |
|
| 6.6.0.2.2.3.7: Tracing the administrative server, application servers, and the wscp client |
|
| 6.6.0.2.2.3.8: Enabling tracing with DrAdmin |
|
| 6.6.0.2.2.3.9: Manipulating the JNDI context of objects |
|
| 6.6.0.2.2.3.10: Monitoring performance |
|
| 6.6.0.2.2.3.11: Setting global security defaults |
|
| 6.6.0.2.2.3.12: Managing security roles |
|
| 6.6.0.2.2.3.13: Connecting to remote servers |
|
InfoCenter |
|
To launch the full documentation set in a separate browser window, click: |
| Display InfoCenter |
| |
PDF library |
|
To browse the PDF library for this product, containing this article and others, click: |
| PDF versions |
| |
Using this documentation |
|
Become an InfoCenter super user! To find out more about navigation, numbering, search, downloads, and more, click: |
| Using this documentation |
| |
|