Technical data

DB (Subschema Description)
Table 3–1 (Cont.) HP COBOL and DDL Utility Data Type Equivalences
DDL COBOL
D_FLOATING COMPLEX (a)
G_FLOATING COMP-2 (/FLOAT=G on Alpha, I64)
G_FLOATING COMPLEX (a)
H_FLOATING (a)
H_FLOATING COMPLEX (a)
CHARACTER l X(l)
UNSIGNED NUMERIC l s 9(m)V9(n)
LEFT SEPARATE NUMERIC l s S9(m)V9(n) LEADING SEPARATE
LEFT OVERPUNCHED NUMERIC l s S9(m)V9(n) LEADING
RIGHT SEPARATE NUMERIC l s S9(m)V9(n) TRAILING SEPARATE
RIGHT OVERPUNCHED NUMERIC l s S9(m)V9(n) TRAILING
ZONED NUMERIC l s (a)
PACKED DECIMAL l s S9(m)V9(n) COMP-3
Legend:
l—The total number of digits for the item.
s—The decimal offset to 1.
( a )—COBOL has no equivalent for this data type. A fatal diagnostic is issued for such an
item, which is part of a subschema record description. The compiler treats this item as if it
had been specified as an alphanumeric data item that occupies the same number of bytes.
( b )—COBOL has no exact equivalent for this data type. A warning diagnostic is issued for
such an item, which is part of a subschema record description. The compiler treats this item
as if it had been specified as the equivalent unsigned COMP item.
The method for describing the assumed decimal point is different in the two
products. In a COBOL picture, the decimal position is directly indicated
by the symbol V or implied by the symbol P. In DDL, scaled numbers are
specified by two integers. The first integer represents the total number of
decimal digits that the item represents. The second integer represents the
decimal offset to the first integer.
For example, the COBOL data item described by PIC 9(4)V99 is equivalent
to the DDL entry TYPE IS UNSIGNED NUMERIC 6 -2. Similarly, the
DDL entry TYPE IS LEFT SEPARATE NUMERIC 6 2 is equivalent to the
COBOL description PIC S9(6)PP SIGN IS LEADING SEPARATE. The items
described using the CDD INDEXED FOR COBOL BY clause become COBOL
index-names.
Schema-name, sub-schema-name, database-name, and stream-name can be
a nonnumeric literal or a COBOL word formed according to the rules for
user-defined names. Database-name represents a complete or partial file
specification. If any of these names is not a literal, the compiler:
Translates hyphens in the COBOL word to underline characters
Translates lowercase alphabetic characters to uppercase
Treats the word as if it were enclosed in quotation marks
Most of the information described in the remaining Technical Notes is
included in the subschema map. See Chapter 1, Program Organization
and Structure, for information on the /MAP qualifier.
Data Division 3–7