Many storage management options available through the Subsystem Management Window also can be sent to the storage subsystem using statements in scripts. Use the Script Editor to create or edit a script file, save a script file to the storage management station's local disk, or load a script file from disk.
The Script Editor has an underlying engine that verifies statement syntax, interprets the statements, converts statements to the appropriate protocol-compliant commands, and passes the commands to the storage subsystem where they are executed by the storage subsystem's controllers.
The Script Editor provides two views in the window:
A splitter bar divides the window between Script View and Output View. You can use the splitter bar to resize the views.
Important: Comments starting with // must end with an end-of-line character, inserted by pressing the Enter key. If the script engine does not find an end of line character in the script after processing a comment, an error message is displayed and the script execution is terminated. This error commonly occurs when a comment is placed at the end of a script and you have forgotten to press the Enter key.
Important: The comment must start with /* and end with */. If the script engine does not find both a beginning and ending comment notation, an error message is displayed and the script execution is terminated.
During script execution, messages are displayed in the Output View beginning with:
Executing script...
After a successful script execution, you see the message
Script execution complete.
If there is an error during the parse phase, an error is displayed in the Output View giving the line and column number and a description of the syntax error.
Example: If you enter the following statement in a script:
set controller[a] mod = passive;
Then, the resulting syntax error is displayed in the Output View as follows:
Encountered "mod" at line 2, column 19
Was expecting one of...
"mode"...
"availability"...
"NVSRAMbyte"...
If there is an error during execution, a message is displayed in the Output View stating that the command failed and reporting a description of the error.
Example: If you enter the following statement in a script:
set
logicalDrive [three] userLabel = "OneOne";In this example, the command could not be sent to the storage subsystem because it was in an Unresponsive state. The resulting error is displayed in the Output View as follows:
Unable to change the logical drive user label using the Set
Logical Drive command at line 1Error - 1 - Could not communicate with the storage subsystem to complete this request.
Important: Certain execution errors, including the inability to communicate with the storage subsystem, always cause script execution to halt. In these cases, execution stops even if you have used the On Error Continue statement.