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

OPTIMIZE 0 (no optimization) is recommended when you are debugging a program using
the ECOBOL compiler. OPTIMIZE 1 (most optimizations) is recommended for production.
For a complete description of this directive, see OPTIMIZE (page 559).
SEARCH Directive
For the NMCOBOL compiler, each object-name in a SEARCH directive must designate a
TNS/R native object file (otherwise the compiler reports an error).
For the ECOBOL compiler, each object-name in a SEARCH directive must designate a TNS/E
native object file (otherwise the compiler reports an error).
For a complete description of this directive, see SEARCH and NOSEARCH (page 565).
UL Directive
For the NMCOBOL compiler, the UL directive generates code for a user library. For the
ECOBOL compiler, the UL directive generates code for a DLL (that is, it has the same effect as
the SHARED directive).
For a complete description of this directive, see UL (page 579).
RENAMES Clause
The RENAMES clause must not rename a level-01 data item. The NMCOBOL compiler does not
detect this error, but the ECOBOL compiler does.
If your TNS/R HP COBOL program has a RENAMES clause that renames a level-01 data item,
change your source code before compiling it with the ECOBOL compiler.
If the level-01 data item is elementary, change the RENAMES clause to a REDEFINES clause. For
example, change:
01 CARD-COUNTER PIC 9(6).
66 ITEM-COUNT RENAMES CARD-COUNTER.
To:
01 CARD-COUNTER PIC 9(6).
66 ITEM-COUNT PIC 9(6) REDEFINES CARD-COUNTER.
If the level-01 data item is a structure, rename the first subordinate data item through the last
subordinate data item . For example, change:
01 CARD-REC.
05 REFERENCE-NUMBER PIC 9(6).
05 CARD-CODES.
10 STORE-CODE PIC 9.
10 STATE-CODE PIC 9(4).
05 ACCOUNT-NUMBER PIC 9(6).
05 CHECK-DIGIT PIC 9.
66 CARD-DATA RENAMES CARD-REC.
To:
01 CARD-REC.
05 REFERENCE-NUMBER PIC 9(6).
05 CARD-CODES.
10 STORE-CODE PIC 9.
10 STATE-CODE PIC 9(4).
05 ACCOUNT-NUMBER PIC 9(6).
05 CHECK-DIGIT PIC 9.
66 CARD-DATA RENAMES REFERENCE-NUMBER THRU CHECK-DIGIT.
For a complete description of the RENAMES clause, see Descriptions That Rename Items (Level 66)
(page 221). For a complete description of the REDEFINES clause, see REDEFINES Clause (page 187).
Source Program Changes 961