IBM SC34-5764-01 Server User Manual


 
Parsing with DBCS Characters
Parsing with DBCS characters generally follows the same rules as parsing with SBCS characters. Literal
strings and symbols can contain DBCS characters, but numbers must be in SBCS characters. See
“PARSE” on page 398 for examples of DBCS parsing.
Details of Steps in Parsing
The three figures that follow are to help you understand the concept of parsing. Please note that the
figures do not include error cases.
The figures include terms whose definitions are as follows:
string start
is the beginning of the source string (or substring).
string end
is the end of the source string (or substring).
length is the length of the source string.
match start
is in the source string and is the first character of the match.
match end
is in the source string. For a string pattern, it is the first character after the end of the match. For a
positional pattern, it is the same as match start.
match position
is in the source string. For a string pattern, it is the first matching character. For a positional
pattern, it is the position of the matching character.
token is a distinct syntactic element in a template, such as a variable, a period, a pattern, or a comma.
value is the numeric value of a positional pattern. This can be either a constant or the resolved value of
a variable.
Parsing
Chapter 15. Parsing 213