Definition Attributes
Data Definition Language (DDL) Reference Manual — 426798-002
6- 72
TYPE Clause
In the preceding examples, note that the simple variable BIT^1 has a different size
from the field BITS^0 in a variable having the structure BIT^STRUCT^DEF.
DDL Type
pTAL or TAL Type
DEF Enum-Spec Begin
TYPE ENUM.
89 Val-1 Value 1.
89 Val-2 Value 3.
89 Val-3 Value 0.
End.
LITERAL VAL^1 = 1,
VAL^2 = 3,
VAL^3 = 0;
INT ENUM^SPEC;
DEF Bits-With-Enums.
02 Bit-Field-1 TYPE BIT 8
ENUM Enum-Spec.
02 Bit-Field-2 TYPE BIT 4.
End.
STRUCT BITS^WITH^ENUMS^DEF (*) FIELDALIGN
(SHARED2);
BEGIN
UNSIGNED(8) BIT_FIELD_1;
UNSIGNED(4) BIT_FIELD_2;
BIT_FILLER 4;
END;
DEF Reused-Bits.
02 Data-Item Type Binary.
02 Bits-Layout-1
Redefines Data-Item.
03 F-11 TYPE BIT 5.
03 F-12 TYPE BIT 6.
03 F-13 TYPE BIT 4.
02 Bits-Layout-2
Redefines Data-Item.
03 F-21 TYPE BIT 4.
03 F-22 TYPE BIT 3.
End.
STRUCT REUSED^BITS^DEF (*) FIELDALIGN
(SHARED2);
BEGIN
INT DATA^ITEM;
STRUCT BITS^LAYOUT^1 = DATA^ITEM;
BEGIN
UNSIGNED(5) F^11;
UNSIGNED(6) F^12;
UNSIGNED(4) F^13;
BIT_FILLER 1;
STRUCT BITS^LAYOUT^2 = DATA^ITEM;
BEGIN
UNSIGNED(4) F^21;
UNSIGNED(3) F^22;
BIT_FILLER 9;
END;
END;