TNS/E Native Application Conversion Guide

Converting COBOL Programs
TNS/E Native Application Conversion Guide529659-003
4-8
Possible Changes Required
Checkpointing
The TNS COBOL compiler automatically checkpoints data items that are stored
directly on the stack in two or fewer bytes (that is, if they are level-01 or level-77 items,
in the Working-Storage Section, and fewer than three characters long). The native
COBOL compiler checkpoints only those data items that one or more CHECKPOINT
statements specify explicitly. For more information on the CHECKPOINT statement,
see the
COBOL Manual for TNS/E Programs
.
Use of RENAMES Clause
As documented in both the
COBOL Manual for TNS and TNS/R Programs
and
COBOL
Manual for TNS/E Programs
, the RENAMES clause must not rename a level-01 data
item. However, if a TNS COBOL program uses a RENAMES clause in this way, the
error is not diagnosed and, in fact, the program executes normally. The TNS/E COBOL
compiler does detect this error. Therefore, if a TNS COBOL program uses a
RENAMES clause to rename a level-01 data item, you must change the source code
as follows before recompiling it with the TNS/E native COBOL 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