UDM Command Format - Strings in Expressions
UDM Command Format - Strings in Expressions
You can use strings as operators in EQ and NE expressions. However, to avoid ambiguity, strings must be quoted explicitly (even if they are contained in a variable reference); otherwise, an error is generated.
The following expression correctly compares strings:
<"yes" EQ "yes">
Conversely, the following expression results in an error because the strings being compared are not quoted:
<yes EQ yes>
For the next two examples, assume that a variable called myvar has been defined with a value of yes.
This expression results in an error because when myvar is referenced, its value (yes) is not quoted:
<$(myvar) EQ "yes">
Instead, the correct expression should be:
<"$(myvar)" EQ "yes">
Index Position and Sequence
When working with strings, the following policy regarding the inclusion/exclusion of positional length/index and sequences should be followed:
- Positional Index or Length = Include the value at that position in the operations.
- Sequences = Exclude the value in operations.
(See deletestring, insertstring, and substring in Universal Data Mover Commands.)