Internal macro command definitions, Addlist, Delay – HP StorageWorks XP Remote Web Console Software User Manual
Page 240: If/endif, Internal macro command definitions addlist

Internal Macro Command Definitions
AddList
The AddList command allows you to add a specified value to a specific list type. If you add a value
to a list that exceeds the maximum number of items for that output list, the excess values will be
ignored. The format for the AddList command is: AddList $D= the output list to which you want to
add a value, $S= the expressions or values to be added to the output list with a numeric range of
0x0000 to 0xffff. For example, to add these values (0, 1, 2, 3, 0x1e, and 0x1f) to the Dev (Device)
B list, the AddList command would be:
AddList $D=_ilDevB ,$S={0,1,2,3,0x1e,0x1f}
Delay
The Delay command allows you to delay a script for a specified length of time. The script delay
time is set in seconds (0 - 3600). The format for the Delay command is: Delay $Time = the length
of time you want to delay the script. For example, to delay a script by 60 seconds, the Delay
command would be:
Delay $Time=60
End
The End command allows you to declare the end of a script. The End command also terminates
the execution of a script. At least one End statement must be described in the trailing line of the
script statement. The format for the End statement is: End
If/EndIf
The If/EndIf statements are used together to allow you to verify the conditions of an expression. If
the If/EndIf statement is successfully completed, succeeding statements will be processed. If the
If/EndIf statement is not successfully completed, the script will abort and the succeeding statements
will not be completed. When If/EndIf statements are used, several conditions must be met. You
must end an If statement with an EndIf statement. The execution statement cannot be defined on
the same line as the If statement. The If statement must contain one conditional decision statement
within parentheses. The string values must be compared as ASCII character codes (see
). The format for an If/EndIf statement is:
If expression one compared with expression two (see
“ASCII Character Codes” (page 240)
for
comparison expressions) macro statement, either internal or functional EndIf.
For example, to start a TrueCopy for Mainframe pair only if the pair was created successfully (result
value of CreateHrcPair command is 0), use the following If/EndIf command:
If (_Result==0) StartHrcPair EndIf
Table 80 ASCII Character Codes
Code
Character
0x30
0
0x31
1
0x39
9
0x41
A
0x5a
Z
0x61
a
0x7a
z
240 TrueCopy for Mainframe Scripting