Data Definition Language (DDL) Reference Manual

Definition Attributes
Data Definition Language (DDL) Reference Manual529431-004
6-50
TYPE
BINARY { 8 } [ UNSIGNED ]
{ [ 16 [ , scale ] ] }
{ 32 [ , scale ] }
{ 64 [ , scale ] }
represents a two’s complement binary number, whose size can be
specified as 8, 16, 32, or 64 bits.
scale
is an integer that specifies the position of an implied decimal point.
A scale of n multiplies the number by 10 to the power of -n ; a scale
of -n multiplies the number by 10 to the power of n. The value of
scale depends on the BINARY item size:
UNSIGNED
declares an item of type BINARY as a positive binary integer.
FLOAT { [ 32 ] }
{ 64 }
represents a signed real number in binary scientific notation.
Note. Use scale only for COBOL, pTAL, and TAL.
BINARY Size scale Size
16 -4 to 4
32 -9 to 9
64 -18 to 18 (for COBOL, -17 to 18)
BINARY Type Lowest Value Highest Value
16 -32,768 32,767
16 UNSIGNED 0 65,535
32 -2,147,483,648 2,147,483,647
32 UNSIGNED 0 4,294,967,295
64 -9,223,372,036,854,775,808 9,223,372,036,854,775,807
64 UNSIGNED* 0 18,446,744,073,709,551,615
* Use BINARY 64 UNSIGNED only for C, pTAL, and TAL—the DDL compiler issues an error
message if you use BINARY 64 UNSIGNED for any other language.
Note. Use FLOAT only for Pascal (on D-series systems), C, FORTRAN, pTAL,
and TAL.
FLOAT Type Length
32 (default) 4 bytes
64 8 bytes