Loading...
Select Version
The BASED clause identifies a record as being a simple template to which no storage space is allocated.
Format
BASED
Syntax rules
The BASED clause may be specified only for data definitions in the LINKAGE SECTION with level number 01 or 77.
It is not permitted to specify USAGE OBJECT REFERENCE, POINTER and PROGRAM-POINTER. In addition, data descriptions that are subordinate to the data description containing the BASED phrase must also not contain USAGE OBJECT REFERENCE, POINTER and PROGRAM-POINTER.
The BASED and REDEFINES phrases may not be used together.
General rule
The start address of this record is set to the predefined address NULL. An address is not assigned until it is explicitly set.
Example 7-4
WORKING-STORAGE SECTION. 01 POINTER-A USAGE POINTER. LINKAGE SECTION. 01 DSECT-A BASED. 02 ... PROCEDURE DIVISION. ... SET ADDRESS OF DSECT-A TO POINTER-A.