z/OS TSO/E CLISTs
|
Previous topic |
Next topic |
Contents |
Contact z/OS |
Library |
PDF
Locating one character string within another - &SYSINDEX z/OS TSO/E CLISTs SA32-0978-00 |
|
|
Use the &SYSINDEX built-in function to locate the position where one character string begins within another character string. In other words, &SYSINDEX returns the numeric index (or offset) of string_1 within string_2. If SYSINDEX does not find string_1 within string_2, &SYSINDEX returns a value of zero. Use the following syntax:
where:
Blanks are valid in string_1 and string_2.
For example:
To search for a blank in string_2, you
can set string_1 to a variable containing
the value &STR( ). For example:
If string_1 or string_2 might
contain a comma or right parenthesis, first set the string to a variable's
value using &STR, then use the variable in &SYSINDEX, again
enclosed in &STR(…). For example:
|
Copyright IBM Corporation 1990, 2014 |