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


WORD, WORDINDEX, and WORDLENGTH

z/OS TSO/E REXX Reference
SA32-0972-00

In EBCDIC:
W = '<><. .A. . .B><.C. .D>'

WORD(W,1)           ->    '<.A>'
WORDINDEX(W,1)      ->    2
WORDLENGTH(W,1)     ->    1

Y = '<><.A. . .B><.C. .D>'

WORD(Y,1)           ->    '<.A>'
WORDINDEX(Y,1)      ->    1
WORDLENGTH(Y,1)     ->    1

Z = '<.A  .B><.C> <.D>'

WORD(Z,2)           ->    '<.B><.C>'
WORDINDEX(Z,2)      ->    3
WORDLENGTH(Z,2)     ->    2

Applying the word extraction from a string and (for WORDINDEX and WORDLENGTH) counting characters rules.

Go to the previous page Go to the next page




Copyright IBM Corporation 1990, 2014