COBOL Manual for TNS/E Programs (H06.08+, J06.03+)

If the sending area still contains any unexamined characters and the current receiving
area is not the last one, then the unstring operation establishes the next result item as
the new current receiving area and begins another unstring cycle.
If the sending area still contains any unexamined characters but the current receiving
area is the last one, then the overflow condition exists and the unstring operation
terminates.
If the sending area does not contain any unexamined characters, then the unstring
operation terminates normally and any remaining receiving areas are ignored.
When the execution of an UNSTRING statement with a TALLYING phrase terminates,
either normally or due to an overflow condition, tally contains a value equal to its
initial value plus the number of data receiving items that were assigned new values.
If an overflow condition arises, execution of the UNSTRING statement terminates at that
point.
3. OVERFLOW/NO OVERFLOW processing phase (optional)
If you include an OVERFLOW phrase, the imperative statement in that phrase is executed;
otherwise control is transferred to the next executable statement in the normal way.
Operand Identification
For each identifier, the process of operand identification occurs only once, at the beginning
of the execution of the UNSTRING statement.
Operand Overlap
Neither the storage area referenced by pointer nor that referenced by tally can be the
same as or overlap the storage area referenced by any other identifier appearing in the
UNSTRING statement.
The storage area referenced by result, delimstore, and count must not overlap or be
the same as any of the storage areas referenced by source, delim-1, or delim-2.
Violation of these rules produces unpredictable results.
National Data Items and National Literals
If any of the data items delim-1, delim-2, result, or delimstore is a national data
item or national literal, then all of them must be national items.
In Example 139, UNSTRING breaks a data item into a collection of data items. UNSTRING uses
the MOVE statement rules in transferring values into shorter data items.
UNSTRING 481