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

Usage Considerations:
Size of Index Data Item
A data item within a record description has an explicit USAGE INDEX clause. Indexes occupied
two bytes in COBOL 74, but occupy four bytes in HP COBOL.
You must convert any files that include records in which index data items occur.
Implied Value of Figurative Constant
A MOVE statement attempts to assign a value of
ALL literal
to a numeric or numeric-edited item, or a relation condition involves such a value.
You must change the literal to deliver the expected value. If X has a picture of 99.9, COBOL 74
handled
MOVE ALL "6" TO X
as meaning
MOVE 6 TO X
HP COBOL handles the same MOVE as meaning
MOVE 66.0 TO X
Precision of Division Operation
The division operator (/) occurs in an arithmetic expression. In COBOL 74, a division could
discard high-level digits without producing a diagnostic. In HP COBOL, a fatal arithmetic
overflow can occur.
Action When Program Not Found
The OVERFLOW clause is present in a CALL statement. HP COBOL accepts EXCEPTION and
NOT EXCEPTION in the CALL statement.
You must replace the OVERFLOW clauses in CALL statements with EXCEPTION clauses.
Search Algorithm
The SEARCH ALL statement in COBOL 74 performed a linear search. In HP COBOL, it performs
a binary search.
You must verify that the table being searched is properly organized (strictly ascending or
descending order) so that a binary search is feasible.
Size of Receiving Operand
The logic of COBOL 74 and HP COBOL differ in some cases when a value is being assigned
to a data structure that contains an item described with an OCCURS DEPENDING phrase.
One instance is that of an UNSTRING statement assigning a value through an INTO phrase
that does not include a DELIMITER phrase, where the DEPENDING item is within the receiving
data structure. COBOL 74 uses the computed size of the receiving item, but HP COBOL uses
the maximum size.
Another, more general case is when a MOVE, UNSTRING, or some other value-delivering
statement stores a value into a data structure that contains an item described with an OCCURS
DEPENDING clause, where the DEPENDING item is not part of the receiving (group) item.
COBOL 74 used the maximum size of the receiving item in performing the storage operation
in all cases but the one mentioned in the previous paragraph. HP COBOL uses the computed
size in all cases where the DEPENDING item is not part of the receiving item.
You must check that the value-assigning statement will do what you want it to do.
546 Program Compilation