HP XP P9000 Command View Advanced Edition Suite Software 7.6.1-00 CLI Reference Guide

Input rules for command lines in batch files, page 444
Conditions for parameters for processing a group of commands in a batch file, page 445
Examples of batch file creation, page 451
Batch file format and input rules
The batch file format is as follows:
beginbatch
hdvmcli command parameter
hdvmcli command parameter
.
.
.
endbatch
The input rules for batch files are as follows:
Only ASCII encoded characters can be used in batch files.
A batch file must have beginbatch on the first line and endbatch on the last line.
Begin a new line after the character string endbatch.
If you do not do this, an error occurs.
Only one type of command can be specified in a single batch file.
Only one type of storage system can be specified in a single batch file.
A maximum of 1,500 commands can be specified in a single batch file.
Some parameter values are case sensitive.
TIP:
If an error has occurred and the processing has stopped, you should check which parts of the batch
file have been executed. The checking process is easier if you create the batch file as follows:
Write commands that have the same port or portname on consecutive lines.
Write commands so that the devnum follows the order of the serial number.
Input rules for command lines in batch files
The commands that you want to execute together must be specified between beginbatch and
endbatch in a batch file. The input rules for each command line are as follows:
Only the command to be executed and the command parameters can be specified on each com-
mand line. URLs, options, or help cannot be specified.
Parameters common to each command line cannot be specified in a properties file.
The same parameter cannot be specified multiple times on the same command line.
Parameters that cannot be used on the same command line cannot be specified.
For example, when executing the DeleteLun command, the port parameter and the portname
parameter cannot be specified at the same time on the same command line.
Command parameters and specified values cannot be enclosed in " and '.
Aside from parameter specifications, a \ must be specified to escape the following characters:
Batch functionality444