Branches, Commands, Branches commands – HP P6000 Continuous Access Software User Manual
Page 171: Job command, Branch
$Rep1 = SnapshotHostVolume ("\\source_host\path\source_hostvol1", FULLY_ALLOCATED, SAME) ONERROR
PAUSEAT E1:
7
//
...
E2: DeleteStorageVolumes ( $Rep1 ) ONERROR PAUSEATE2:
13
...
Usage
Assignments are:
•
Local to each job and cannot be referenced across jobs.
•
Not case sensitive.
Format
•
The first two characters must be a dollar sign ($) followed by an alpha character. No special
characters are allowed after the first character.
•
Upper and lower case, alpha and numeric are allowed.
•
Underscores are allowed; spaces are not allowed.
Branches
Branches and labels are typically used to handle errors and to create jobs that can be looped
repeatedly. In line 9 of the following example, the command branches to label E1 on line 30 if
there is an error when the command is executed.
Task
Line
...
Launch ( %source_host%, %suspend_command_line%, "", WAIT, "0" ) onerror pauseat E1:
9
...
E1: Exit (FAILURE)
30
Branching types
•
Default. If the command fails, abort the job at this task (line).
•
None. Use the default behavior.
•
Onerror Goto. If the command fails, go to the label. Execute the command at the label.
•
Onerror Pauseat. If the command fails, go to the label and pause the job. When the job is
continued from the GUI or CLUI, resume the job by executing the command at the label.
•
Onsuccess Goto. If the command is successful, go to the label. Execute the command at the
label.
Commands
When you include a command in a job, the command's arguments and default values are displayed
in the job editor window. Argument names that appear with red % markers indicate that specific
values are required. See job
. For example:
SnapcloneStorageVolume ( %storvol_unc_name%, "", SAME, "", WAIT )
^ command
^ arguments ... ^
^
^
^
Job concepts
171