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


Including leading and trailing blanks and leading zeros

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

If you want leading and trailing blanks and leading zeros in a &LENGTH expression included in the assignment, enclose the expression in a &STR built-in function. Otherwise, the blanks and zeros are ignored.

For example, suppose that you want to save the length of the variable &IFIELD in a variable called &SLNGTH. The contents of &IFIELD are 0 472.20. Include &IFIELD in the &STR built-in function to include the blanks and the leading zero as part of the assignment:
SET SLNGTH= &LENGTH(&STR(&IFIELD))

After the previous statement executes, &SLNGTH contains the value 8.

Go to the previous page Go to the next page




Copyright IBM Corporation 1990, 2014