WORD, WORDINDEX, and WORDLENGTH

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.

Reference Reference

Feedback


Timestamp icon Last updated: Tuesday, 7 January 2014


http://pic.dhe.ibm.com/infocenter/cicsts/v5r1/topic/com.ibm.cics.rexx.doc//dfhrx/dfword.html