Script source structure – Visara Master Console Center Scripting Guide User Manual
Page 13
Chapter 1 Script Overview
Scripting Guide
13
A script source file format is a standard ASCII file—it can be written
anywhere and copied to the MCC server when ready, for instance using
FTP. The script source and executable files are stored as Unix files in the
MCC system.
Script Source Structure
Source scripts can consist of several different steps. An example of the
structure of a script source:
Script source begins.
*Step 1:
Turn on air conditioners, chiller, and CPU power.
*Step 2:
CPU IML reset.
*Step 3:
Load operating system.
*Step 4:
Boot subsystem.
Script source ends.
Script lines such as “*Step 1:” above are called “labels” or “label
statements”. Labels help make the script source easier to read, and, most
importantly, are used as reference points for script logic control. Labels
generally define a cohesive set of commands that are always executed
together. As a reference point, a label is used for branch execution or a
“go to”—an immediate transfer of script execution to the reference point.
A go to can be made to any step within the current script.
Steps may include:
Command statements, which affect the MCC processing, and
Comment statements, which document the script and make it easier
to read. Comment statements can be on separate line or on a line with
the script, as shown below.
*Label Statement 1:
//Comment statement
COMMAND STATEMENT
COMMAND STATEMENT
COMMAND STATEMENT // comment
COMMAND STATEMENT
*Label Statement 2:
//Comment statement
COMMAND STATEMENT
COMMAND STATEMENT