Specifying the search string
The primary control for any search is the search string because it represents the value for which you are looking. Two operands, string1 and string2, are required for the CHANGE command to specify the new value of the string once it is found. The rules for specifying string1 and string2 are the same, except that if you type a single asterisk for string2, the previous value is used again.
You can define string, string1, and string2 to be EBCDIC, DBCS, and mixed strings in any combination. If you delimit a DBCS search string with SO and SI characters, the SO and SI characters are not used as part of the string. If you specify a mixed string that contains no EBCDIC characters, the string is treated as a DBCS string; that is, the SO and SI characters are not used as part of the string.
- Simple string
- Any series of characters not starting or ending with a quote (
'or") and not containing any embedded blanks, commas, or asterisks. - Delimited string
- Any string enclosed (delimited) by either single quotes ( ' ) or double quotes ( " ). The beginning and ending delimiters must be the same character. The string can contain the delimiter character. However, if a delimiter character in the string is followed by a blank ( ) or a comma ( , ), that delimiter character is processed as the ending delimiter. A delimiter character in the string is also processed as the ending delimiter if it is followed by the letter c, p, r, t, or x. In these cases, the letter is processed as an indication that the preceding string is a character, picture, regular expression, text, or hexadecimal string.
- Hexadecimal string
- Any delimited string of valid hexadecimal characters, preceded
or followed by the character X, such as
X'C27B'. - Character string
- Any
delimited string of characters, preceded or followed by the character
C, such as
C'conditions for'. See Character strings for more information. - Picture string
- Any delimited string of picture
characters, preceded or followed by the character P, such as
P'.'. See Picture strings (string, string1) and Picture strings (string2) for more information. - Regular expression
- Any delimited string
of characters, preceded or followed by the character R, such as
R'h[aeiou]d', or the characters RC, such asRC'M[ai]ster'. Use RC to request a case sensitive search be performed. See Regular expressions (string, string1) for more information.