Most of the UNSTRING statements flagged with messages 3211 through 3214
will generate identical results. Only certain dependencies between the operands
in the UNSTRING statement will generate different results.
For example, a dependency can exist between two operands (op-1 and op-2)
in an UNSTRING statement in the following ways:
- op-1 is subscripted, and the subscript value is modified by op-2:
- The subscript identifier is used as a receiver in an INTO, DELIMITER IN,
or COUNT IN operand.
- The subscript identifier is a variably located item, and an ODO object
affecting the location of this item is used as a receiver in an INTO, DELIMITER
IN, or COUNT IN operand.
- op-1 is a variable-length group item, and an ODO object affecting the
length of this group is modified by op-2:
- The ODO object is used as a receiver in an INTO, DELIMITER IN, or COUNT
IN operand.
- op-1 is a variably located item, and an ODO object affecting the location
of this item is modified by op-2:
- The ODO object is used as a receiver in an INTO, DELIMITER IN, or COUNT
IN operand.
Note: Dependencies generated by overlapping operands, or by specifying the
same identifier as a DELIMITED BY operand and as one of the sending, INTO,
or DELIMITER IN operands are illegal under both the COBOL 74 and 85 Standards
and are not addressed here. Generally, results will be unpredictable.
Compiling the program with the CMPR2 and FLAGMIG options causes the compiler
to issue messages for all UNSTRING statements that might contain such dependencies.
Any UNSTRING statements not flagged with one of these messages will generate
identical results under CMPR2 and NOCMPR2.
All UNSTRING statements flagged with message 2222 will require changes
to guarantee identical results.