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

Procedure Division Verbs
HP COBOL Manual for TNS/E Programs520347-003
9-266
UNSTRING
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 9-68, UNSTRING breaks a data item into a collection of data items.
UNSTRING uses the MOVE statement rules in transferring values into shorter data
items.