Examples of substringing
The substring, FEB, is assigned to the M2 variable.
The next example shows how substrings can be used to determine a value, in this case the name of the month:
The substring expression ZDATE(1:2) specifies the first character, for a length of two characters, of the mm/dd/yyyy value passed to ZDATE (03 for example). The substring expression, MONS(&V3:3), selects the portion of the character string determined by the value of the V3 variable and limits the substring to 3 characters. If 03/15/2000 is passed to the ZDATE predefined variable, the variables are assigned the following values:
Variable | Assigned value |
---|---|
V1 | 2 |
V2 | 6 |
V3 | 7 |
MNTH | MAR |
Tip: For faster searching, add an asterisk to the end of your partial query. Example: cert*