Using the DS CLI interactive command mode

Use the DS CLI interactive command mode when you must process multiple transactions that cannot be incorporated into a script. The interactive command mode provides a history function that makes repeating or checking prior command usage easy to do.

In addition to being able to enter DS CLI commands at the DS CLI command prompt, a history function provides a view of the last DS CLI commands that you have used. It also allows you to repeat any of the last commands more quickly than having to type out the entire command. The example at the end of this process shows how the history function works.

Note: Many of the DS CLI commands have a feature that allows you to specify a dash (-) for the parameter and the parameter value is automatically supplied. For example, you can issue the following command at the dscli prompt
dscli>rmarray -dev IBM.2107–75FA120 -
where the dash (-) substitutes for an array ID, which is supplied automatically by the system. You cannot use the dash (-) while in the DS CLI interactive command mode.

Perform the following steps to use the DS CLI in the interactive command mode:

  1. Log on to the DS CLI application at the directory where it is installed.
    Note: If you make a mistake and type the wrong user name or password, you cannot correct the error within the current session. Exit the DS CLI session that you are in and log in to a new DS CLI session.
  2. Provide the information that is requested by the information prompts. The information prompts might not appear if you have provided this information in your profile file. The command prompt switches to a dscli command prompt.
  3. Begin using the DS CLI commands and parameters. You are not required to begin each command with dscli because this prefix is provided by the dscli command prompt.
    Note: Issue the setoutput command if you know that you will be using interactive mode for a lengthy period of time. The setoutput command allows you to set or display command output format options. You control how the reports that are generated by the list and the show commands are displayed on your computer. For example, you can specify that the reports be displayed in one of the following formats:
    • delim = displays output in a table format and sets the column delimiter to a single character
    • xml = displays output in XML format
    • stanza = displays output in stanza (horizontal table) format

    See the setoutput command for more details.

To use the DS CLI history function that is associated with the interactive command mode, perform the following steps:
  1. Issue an exclamation mark (!) to display CLI commands that you have used in the current session. For example: dscli>! results in a list of commands such as the following:
    [4] lsarraysite -dev IBM.1750-1300771
    [3] lsarray -dev IBM.1750-1300771 
    [2] lsextpool -dev IBM.1750-1300771 
    [1] lsextpool -dev IBM.1750-1300771
  2. Issue dscli>!1 to retry the last command. Or, issue dscli>!3 to retry command [3].
Library | Support | Terms of use | Feedback
© Copyright IBM Corporation 2004, 2007. All Rights Reserved.