PARSE
In EBCDIC:
x1 = '<><.A.B><. . ><.E><.F><>'
PARSE VAR x1 w1
w1 -> '<><.A.B><. . ><.E><.F><>'
PARSE VAR x1 1 w1
w1 -> '<><.A.B><. . ><.E><.F><>'
PARSE VAR x1 w1 .
w1 -> '<.A.B>'
The leading and trailing SO and SI are unnecessary for word parsing and, thus, they are stripped off.
However, one pair is still needed for a valid mixed DBCS string to be returned.
PARSE VAR x1 . w2
w2 -> '<. ><.E><.F><>'
Here the first blank delimited the word and the SO is added to the string to ensure the DBCS blank and
the valid mixed string.
PARSE VAR x1 w1 w2
w1 -> '<.A.B>'
w2 -> '<. ><.E><.F><>'
PARSE VAR x1 w1 w2 .
w1 -> '<.A.B>'
w2 -> '<.E><.F>'
The word delimiting allows for unnecessary SO and SI to be dropped.
x2 = 'abc<>def <.A.B><><.C.D>'
PARSE VAR x2 w1 '' w2
w1 -> 'abc<>def <.A.B><><.C.D>'
w2 -> ''
PARSE VAR x2 w1 '<>' w2
w1 -> 'abc<>def <.A.B><><.C.D>'
w2 -> ''
PARSE VAR x2 w1 '<><>' w2
w1 -> 'abc<>def <.A.B><><.C.D>'
w2 -> ''
Note that for the last three examples '', <>, and <><> are each a null string (a string of length 0). When
parsing, the null string matches the end of string. For this reason, w1 is assigned the value of the entire
string and w2 is assigned the null string.
PUSH and QUEUE
The PUSH and QUEUE instructions add entries to the program stack. Since a stack entry is limited to 255
bytes, the expression must be truncated less than 256 bytes. If the truncation splits a DBCS string, REXX
will insure that the integrity of the SO-SI pairing will be kept under OPTIONS EXMODE.
SAY and TRACE
The SAY and TRACE instructions write data to the output stream. As was true for the PUSH and QUEUE
instructions, REXX will guarantee the SO-SI pairs are kept for any data that is separated to meet the
requirements of the output stream. The SAY and TRACE instructions display data on the user's terminal.
As was true for the PUSH and QUEUE instructions, REXX will guarantee the SO-SI pairs are kept for any
data that is separated to meet the requirements of the terminal line size. This is generally 130 bytes or
fewer if the DIAG-24 value returns a smaller value.
398 CICS TS for VSE/ESA: REXX Guide