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

Program Compilation
HP COBOL Manual for TNS/E Programs520347-003
11-46
DIAGNOSE-74 and NODIAGNOSE-74
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.