The CMS command line tool is an addition to the Change Management Service (CMS) Web User Interface. It allows you to perform the required administrative tasks in a shell-oriented environment.
The CMS command line tool is in the directory <SAP NetWeaver Developer Studio Install Dir>/eclipse/tools/cmstool.
You can start the tool using cmstool script.
Before you run the script cmstool you have to set the following environment variables:
● JAVA_HOME – points to the location of the JSDK on your machine.
● NWDITOOLLIB – refers to the lib directory of the NWDI tools. You have to use the absolute path of the lib directory.
To get more information on a specific command (especially which arguments it takes) enter
help <command name>
and choose Enter.
The command to establish or change a connection to CMS is.
connectcms | cc -t <trackID> [-d <domainID>] [-c <CMS URL>] [-u <user>] [-p <password>] [--dtr]
The CMS command line tool writes user messages to the console. You can redirect user messages into a file by using the command logfile.
The user messages will be redirected into the file useroutput.txt.
logfile –f useroutput.txt –m on ––append
If you use the command logfile with option –m and parameter off, the user messages will be redirected back to the console.
Besides user messages there are also technical messages – that is the stack traces. The stack traces are useful in case of problems or errors.
These messages are not written to the console.
The technical messages will be redirected into the file tracemsg.txt
tracefile ––m on –f tracemsg.txt
If you use the command tracefile with option ––sl, you can specify how detailed the trace messages should be.
It is also possible to collect commands in a text file. Here you have to separate commands by semicolon as well. The text file can be passed using a command line to the tool. Note that you have to put an At sign (@) before the file name in order to distinguish a file name from a command.
If you have a certain sequence of commands that you want to execute periodically, you can collect those commands in a text file and pass this text file:
cmstool @commandfile.txt
For batch processing the CMS tool gives a return code back when it terminates. This return code is the highest return code of the all executed commands. A value different to 0 means that a problem occurred.
We recommend you check the return code in the scripts that launch the batch processing.
See also: