COBOL Manual for TNS/E Programs (H06.03+)
Migrating TNS/R Programs to TNS/E Programs
HP COBOL Manual for TNS/E Programs—520347-003
33-5
Possible Changes Required
•
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.
•
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.
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.










