Data Definition Language (DDL) Reference Manual (G06.24+)
Definition Attributes
Data Definition Language (DDL) Reference Manual—426798-002
6-51
TYPE Clause
TYPE Clause Guidelines
In the TYPE clause, you can declare the type and size of an object, group, or field in 
one of three ways:
•
Specify a data type.
•
Refer to an existing definition that has a different name from the object, group, 
or field.
•
Refer to an existing definition that has the same name as the object, group, or 
field.
The following subsections give guidelines for using the three forms of the TYPE 
clause.
Specifying a Data Type. The following are guidelines for using TYPE data-type:
•
BINARY data types:
•
For C, the BINARY 16, 32, and 64 data types are translated into types short, 
long, and long long, respectively. Any scale factor is ignored.
•
For COBOL85, the BINARY 16, 32, and 64 data types are translated to 
NATIVE-2, NATIVE-4, and NATIVE-8 data types, respectively.
If scale is specified, the BINARY data type is translated to PIC [S]9(n)V9(n) 
COMP if the scale is positive, or to PIC [S]9(n)P(n) COMP if the scale is 
negative. The PICTURE clause includes S unless UNSIGNED is specified. 
This is identical to the code generated for COBOL 74.
UNSIGNED does not affect generation of COBOL code for a BINARY data 
type when scale is not specified.
•
For Pascal, the BINARY 16, 32, and 64 data types are translated into INT16, 
INT32, and INT64, respectively. Types BINARY 16 UNSIGNED and BINARY 
32 UNSIGNED are translated into Pascal types CARDINAL and INT32, 
respectively. Pascal does not support scaling; any scale factor is ignored.
•
For TACL, the BINARY 16, 32, and 64 data types are translated to INT, INT2, 
and INT4, respectively. An UNSIGNED clause is ignored for TYPE BINARY 
32, but is translated to UINT for TYPE BINARY 16. Any specified scale is 
ignored.
•
For pTAL or TAL, the BINARY 16, 32, and 64 data types are translated to INT, 
INT(32), and FIXED data types, respectively. If UNSIGNED is specified, it is 
ignored in the TAL data type. Scale is ignored for BINARY 16 and BINARY 32; 
for BINARY 64, scale becomes the fpoint value of a FIXED data type.
•
ENUM data type:
•
For C, the ENUM data type is translated into an enumeration type with the 
level 89 items included as literals in the C type.










