Your Browser is not longer supported

Please use Google Chrome, Mozilla Firefox or Microsoft Edge to view the page correctly
Loading...

{{viewport.spaceProperty.prod}}

BASED clause

The BASED clause identifies a record as being a simple template to which no storage space is allocated.

Format


BASED


Syntax rules

  1. The BASED clause may be specified only for data definitions in the LINKAGE SECTION with level number 01 or 77.

  2. 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.

  3. The BASED and REDEFINES phrases may not be used together.

General rule

  1. 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.