HP 418800-B21 HP StorageWorks Replication Solutions Manager 4.0.1 job command - Page 16

Branches, Commands

Page 16 highlights

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. Line Task ... 9 Launch ( %source_host%, %suspend_command_line%, "", WAIT, "0" ) onerror pauseat E1: ... 30 E1: Exit (FAILURE) 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 arguments. For example: SnapcloneStorageVolume ( %storvol_unc_name%, "", SAME, "", WAIT ) ^ command ^ arguments ... ^ ^ ^ ^ You must edit the command and select or enter values for any required arguments. After editing, the command displays the argument value as normal text, in quotes. SnapcloneStorageVolume ( "\\Array2\Cats", "", SAME, "", WAIT ) You can also edit a command to change its default values. In the example below, the defaults for disk group name and snapclone name have been changed. SnapcloneStorageVolume ( "\\Array2\Cats", "DskGrp3", SAME, "CatsCopy", WAIT ) You can also edit a command to add job flow controls and assignments. See job labels, branches and assignments. 16 Job concepts, templates and commands

  • 1
  • 2
  • 3
  • 4
  • 5
  • 6
  • 7
  • 8
  • 9
  • 10
  • 11
  • 12
  • 13
  • 14
  • 15
  • 16
  • 17
  • 18
  • 19
  • 20
  • 21
  • 22
  • 23
  • 24
  • 25
  • 26
  • 27
  • 28
  • 29
  • 30
  • 31
  • 32
  • 33
  • 34
  • 35
  • 36
  • 37
  • 38
  • 39
  • 40
  • 41
  • 42
  • 43
  • 44
  • 45
  • 46
  • 47
  • 48
  • 49
  • 50
  • 51
  • 52
  • 53
  • 54
  • 55
  • 56
  • 57
  • 58
  • 59
  • 60
  • 61
  • 62
  • 63
  • 64
  • 65
  • 66
  • 67
  • 68
  • 69
  • 70
  • 71
  • 72
  • 73
  • 74
  • 75
  • 76
  • 77
  • 78
  • 79
  • 80
  • 81
  • 82
  • 83
  • 84
  • 85
  • 86
  • 87
  • 88
  • 89
  • 90
  • 91
  • 92
  • 93
  • 94
  • 95
  • 96
  • 97
  • 98
  • 99
  • 100
  • 101
  • 102
  • 103
  • 104
  • 105
  • 106
  • 107
  • 108
  • 109
  • 110
  • 111
  • 112
  • 113
  • 114
  • 115
  • 116
  • 117
  • 118
  • 119
  • 120
  • 121
  • 122
  • 123
  • 124
  • 125
  • 126
  • 127
  • 128
  • 129
  • 130
  • 131
  • 132
  • 133
  • 134
  • 135
  • 136
  • 137
  • 138
  • 139
  • 140
  • 141
  • 142
  • 143
  • 144
  • 145
  • 146
  • 147
  • 148
  • 149
  • 150
  • 151
  • 152
  • 153
  • 154
  • 155
  • 156
  • 157
  • 158
  • 159
  • 160
  • 161
  • 162
  • 163
  • 164
  • 165
  • 166
  • 167
  • 168
  • 169
  • 170
  • 171
  • 172
  • 173
  • 174
  • 175
  • 176
  • 177
  • 178
  • 179
  • 180
  • 181
  • 182
  • 183
  • 184
  • 185
  • 186
  • 187
  • 188
  • 189
  • 190
  • 191
  • 192
  • 193
  • 194
  • 195
  • 196
  • 197
  • 198
  • 199
  • 200
  • 201
  • 202
  • 203
  • 204
  • 205
  • 206
  • 207

Usage
Assignments are:
Local to each job and cannot be referenced across jobs.
Not case sensitive.
Format
The
rst two characters must be a dollar sign ($) followed by an alpha character. No special
characters are allowed after the
rst 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.
Line
Task
...
9
Launch ( %source_host%, %suspend_command_line%, "", WAIT, "0" )
onerror pauseat E1
:
...
30
E1
: Exit (FAILURE)
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 speci
c values
are required. See job
arguments
.
For example:
SnapcloneStorageVolume (
%storvol_unc_name%
, "", SAME, "", WAIT )
^
command
^
arguments
...
^
^
^
^
You must edit the command and select or enter values for any required arguments. After editing, the
command displays the argument value as normal text, in quotes.
SnapcloneStorageVolume ( "\\Array2\Cats
"
, "", SAME, "", WAIT )
You can also edit a command to change its default values. In the example below, the defaults for
disk
group name
and
snapclone name
have been changed.
SnapcloneStorageVolume ( "\\Array2\Cats", "DskGrp3", SAME, "CatsCopy", WAIT )
You can also edit a command to add job
ow controls and assignments. See job
labels
,
branches
and
assignments
.
16
Job concepts, templates and commands