COBOL Manual for TNS/E Programs (H06.08+, J06.03+)
• Use in Linkage Section
A BASED item declared in the Linkage Section cannot be listed in the USING phrase of
the procedure division header, and has no corresponding actual parameter in the calling
program-unit.
◦
◦ The lifetime of the implicit pointer for a BASED item in the Linkage section ends when the
program returns control to its calling program; the next time this program is called, the
implicit pointer is again initialized to NULL.
• Based Item Cannot be Transferred to Backup Process
A BASED item cannot be transferred to a backup process by the CHECKPOINT statement.
• Effect of CANCEL Statement
When a CANCEL statement restores a previously-called program to its initial state, each BASED
item’s implicit pointer is set to NULL. Note that this action does not release any dynamic
memory addressed by the implicit pointer; any such dynamic memory might become
inaccessible.
Descriptions That Rename Items (Level 66)
The RENAMES clause assigns a new data-name to an item or to two or more contiguous items in
a record. RENAMES does not cause allocation of storage. You can put level-66 items in any section
of the Data Division.
new-name
is the alias for an elementary item or a data structure.
old-name
is either the name of a data structure or the name of the first of several items to be given an
alias. It can be qualified.
end-name
is the last group name or last item name included in the alias name. It can be qualified.
The level-66 data description entry in Example 54 renames several items in a record so that you
can refer to the items by one name.
Example 54 Level-66 Data Description Entry
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-NUMBER RENAMES CARD-CODES THRU CHECK-DIGIT.
Usage Considerations:
• RENAMES Stands Alone
Because RENAMES merely renames a group of existing data items and does not redescribe
any of their characteristics, no other clauses can be used with it. One or more RENAMES
Descriptions That Rename Items (Level 66) 221










