┌─────────────────────────┐
│Start: Match end <=
│
string start?
└───────────┬─────────────┘
yes
┌─────────────────────────┐
│String end=length + 1.
└───────────┬─────────────┘
┌──────────────────────────────────────────────────────────────────────┐
│Substring=substr(source string,string start,(string end─string start))│
│Token=previous pattern.
└───────────┬──────────────────────────────────────────────────────────┘
───────────────────────────────────────────────┐
┌─────────────────────────┐no
│Any more tokens?
└───────────┬─────────────┘
yes
┌─────────────────────────┐
│Step to next token.
└───────────┬─────────────┘
┌─────────────────────────┐no ┌────────────────────────┐
│Token a variable or a
│period?
└───────────┬─────────────┘
yes
┌─────────────────────────┐no
│Any more tokens?
└───────────┬─────────────┘
yes
┌─────────────────────────┐
│Next token a variable or │ no │Assign rest of substring│
│period?
└───────────┬─────────────┘
yes
┌─────────────────────────┐ no ┌────────────────────────┐
│Any substring left?
└───────────┬─────────────┘
yes
┌─────────────────────────┐
│Strip any leading blanks.│
└───────────┬─────────────┘
┌─────────────────────────┐ no ┌────────────────────────┐
│Any substring left?
└───────────┬─────────────┘
│
yes
┌─────────────────────────┐ no ┌────────────────────────┐
│Blank found in substring?├─── │Assign rest of substring│
│
└───────────┬─────────────┘
yes
┌───────────────────────────────────────────────────────────┐ │
│Assign word from substring to variable and step past blank.│ │
└───────────────────┬───────────────────────────────────────┘ │
└─────────────────────────────────────────┘
Figure 52. Conceptual View of Word Parsing
216
CICS TS for VSE/ESA: REXX Guide
┌────────────────────────┐
│no │
├─── │String end=match start. │
└────────────────────────┘
│
├─────────────┐
│
│
│
│
│
│
├─── │Return.
│
└────────────────────────┘
├─────────────┐
│
┌────────────────────────┐
├─── │to variable.
└─────────────┬──────────┘
└─────────────── │
├─── │Assign null string to
│variable.
└─────────────┬──────────┘
└─────────────── │
├─── │Assign null string to
│variable.
└─────────────┬──────────┘
└─────────────── │
│
│to variable.
└─────────────┬──────────┘
└─────────────── │
│
│
│
│
│
│
│
│
│
│
│
│
│
│
│
│
│
│
│
│
│
│
│
│
│
│
│
│
│
│
│
│
│
│
│
│
│
│
│
│
│
│
│
│
│