csmcli

The csmcli command is the Copy Services Manager command-line interface (CLI) program. This command can be used either on its own, using the associated options and arguments, or interactively by starting csmcli with no parameters or arguments to start an interactive session.

Syntax

Read syntax diagramSkip visual syntax diagramcsmcli-help-h-?command_name-overview-noinfo-saf-username  user_name  -password  password-serverdomain_nameip_address-port  port-script file_name

Parameters

-help | -h | -? [command_name]
Displays help for the specified command. If you do not specify a command name, this option displays help for the csmcli command. If you specify more parameters and arguments other than a command name, those parameters and arguments are ignored.
-overview
Displays overview information about using the CLI program.
-noinfo
Removes the copyright, version, and build information when you start the csmcli.
-saf
Queries the SAF facility defined in repcli.properties to optionally bypass the password prompt and use the user that is currently logged into the OMVS shell or user specified in a BPXBATCH job calling the CLI. The access of a user is validated as a member of the facility if all prerequisite configurations were completed and expected permissions were set correctly.
-username user_name
Specifies the Copy Services Manager user name with which you want to log in.
-password password
Specifies the password for the Copy Services Manager user name with which you want to log in.
Important: When you specify this option, the password is displayed as plain text. Using this form of authentication can cause a security exposure.

If you specify a user name but not a password, and Copy Services Manager does not find the password in an authentication file, you are prompted for the password. If prompted for the password, the password does not display in plain text.

-server {domain_name |ip_address}
Sets the domain name or IP address of the Copy Services Manager server to which you want to connect.
Remember: The server domain name or IP address is used only during this CLI session.
-port port
Sets the port number to be used by the CLI program to connect to the Copy Services Manager server. The default value is 5110.
Remember: The port number is used only during this CLI session.
-scriptfile_name
Runs the set of command strings in the specified file outside of an interactive CLI session. If you specify this parameter, you must specify a file name.

The format options that are specified by using the setoutput command apply to all commands in the script.

command_string
Runs the specified command string outside of a CLI session.

Description

You can run csmcli commands locally from the management server or remotely by accessing the management server by using a remote-access utility, such as Secure Shell (SSH) or Telnet.

You can run the csmcli command without any parameters (or with only the username and password parameters) to start an interactive CLI session. If the username and password parameters are not entered initially, you will be prompted to enter them.

Remember:
You can also go to the installation directory and double-click the csmcli.bat or csmcli.sh file to start a csmcli session in interactive mode. The default directory paths to these executable files for each operating system are provided in the following table.
Operating system Default directory
z/OS® path_prefix/opt/IBM/CSM/CLI/
Windows C:\Program Files\IBM\CSM\CLI
Linux or AIX path_prefix/opt/IBM/CSM/CLI

On Linux® systems, you must enter the CLI program name (csmcli) in lowercase. Command input can be either lowercase, uppercase, or mixed case, unless specific command parameters require case sensitivity.

Each CLI command issues a return value and message. Warning and informational messages are written to the standard output stream (stdout). Error messages are written to the standard error stream (stderr). If a syntax error occurs while one of the commands in the script is running, the script exits at the point of failure and returns to the system prompt.

Start an interactive CLI session

This example illustrates how to start a CLI session if you did not set up an authentication configuration file.

shell> csmcli -username admin -password admin
 
Start an interactive CLI session using -saf

This example illustrates how to start a CLI session using the -saf parameter for authentication and run a command, simultaneously.

shell> csmcli -saf mksess -cptype mmf0fb test1
Set the server and port for the management server

This example illustrates how to set the server domain name to localhost and port number to 5110 for the local management server.

shell> csmcli -server localhost -port 5110
Run several commands by using a script file

This example illustrates how to run several commands by using a script file name cli_script.txt.

shell> csmcli -script cli_script.txt