z/OS TSO/E CLISTs
Previous topic | Next topic | Contents | Contact z/OS | Library | PDF


Determining an expression's length in characters - &SYSCLENGTH

z/OS TSO/E CLISTs
SA32-0978-00

Use &SYSCLENGTH built-in function to determine the number of characters in an expression or string that contains characters of the double-byte character set (DBCS). &SYSCLENGTH differs from &LENGTH in that &SYSCLENGTH counts each DBCS character as one character instead of two bytes, and does not count DBCS delimiters. For example:
SET A = &SYSCLENGTH(<d1d2>)    /* result: &A = 2
The same is true when a string contains mixed EBCDIC and DBCS characters. For example:
SET A = &SYSCLENGTH(ABC<d1d2>)    /* result: &A = 5
Except for the difference in counting DBCS characters, &SYSCLENGTH is identical to &LENGTH.

Go to the previous page Go to the next page




Copyright IBM Corporation 1990, 2014