Data Definition Labels
ANSI
There are three types of Data Definitions: Character, Numeric, and Object. Data Definitions may be declared anywhere within the program, provided it is before being referenced by an operation. Data Definitions are identified by a LABEL previously unused by a Data Definition.
Data Definitions reserve memory for the defined variables. However, LABELs are not required for each Data Definition unless it is referenced by an OPERATION. Nevertheless, unlabelled Data Definitions are only practical for table searches or as assembler variables (see ENTERZ/EXITZ). Data Definition Labels must adhere to the following rules:
The LABEL must begin in the first column and may not be the only item on the line.
The LABEL references the Data Definition declared on the line.
The amount of memory required for a Data Definition is greater than just the amount required for it contents. Both Numeric and Character string Data Definitions require memory space for a variable type designator and a Physical Length designator. In addition, character string Data Definitions also require memory space for two other designators associated with the physical and logical contents of the Data Definition. Object variables memory is allocated dynamically by the operating system.
See Also: Instruction Syntax
![]() |