Data Definition Language (DDL) Reference Manual
Definition Attributes
Data Definition Language (DDL) Reference Manual—529431-004
6-53
Specifying TYPE data-type
BINARY
•
C
BINARY 16, 32, and 64 data types are translated to types short, long, and long
long, respectively. Any scale factor is ignored.
For H06.03 and later RVUs, the HP C and HP C++ compilers support the data type
unsigned long long, which corresponds to the DDL data type BINARY 64
UNSIGNED.
The value of an item of type BINARY 64 UNSIGNED cannot be in octal form.
•
COBOL
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.
UNSIGNED does not affect generation of COBOL code for a BINARY data type
when scale is not specified.
•
Pascal (D-series Systems Only)
BINARY 16, 32, and 64 data types are translated to INT16, INT32, and INT64,
respectively. Types BINARY 16 UNSIGNED and BINARY 32 UNSIGNED are
translated to Pascal types CARDINAL and INT32, respectively. Pascal does not
support scaling; any scale factor is ignored.
•
TACL
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.
Example 6-44. C BINARY 64 and BINARY 64 UNSIGNED (H06.03 and Later RVUs)
DDL Code C Code
def def1 type binary 64 unsigned. typedef unsigned long long def1_def;
def def2.
02 f1 type binary 64
02 f2 type binary 64 unsigned.
end.
typedef struct __def2
{
long long f1;
unsigned long long f2;
} def2_def;
def def3 pic 9(10) comp. typedef unsigned long long def3_def;
def def4 type binary 64,-18 unsigned. typedef unsigned long long def4_def;