Data Definition Language (DDL) Reference Manual
Definition Attributes
Data Definition Language (DDL) Reference Manual—529431-004
6-68
Specifying TYPE *
If you use NULL or UPSHIFT in a definition that refers to another definition, the 
referring definition inherits the null value and upshift attribute from the referenced 
definition.
You can use TYPE def-name to specify the length of a FILLER field. The FILLER 
field assumes the total length of the referenced definition.
If you add comments, the new comments replace the original comments in a definition 
referenced by another definition. CLISTOUTDETAIL lists the original comments along 
with the new ones. For more information, see the CLISTOUT on page 9-21.
Specifying TYPE *
Specifying TYPE * refers to an existing definition that has the same name as the 
object, group, or field that you are defining.
The DDL compiler reads the definition with the same name as the subject of the TYPE 
* clause from the dictionary and then places the entire referenced definition at the level 
of the referring object.
The level number of a data element immediately following the TYPE * element in the 
same DEFINITION statement must be equal to or less than the level number of the 
TYPE * data element.
Any HEADING, DISPLAY, NULL, or VALUE clauses in the referring data element 
override any equivalent clauses in the referenced data element−but only if the clauses 
are at the outermost level of the referenced definition.
If you add comments, the new comments replace the original comments in a definition 
referenced by another definition. CLISTOUTDETAIL lists the original comments along 
with the new ones. For more information, see the CLISTOUT on page 9-21.
Example 6-56. TYPE def-name and TYPE * Clauses (page 1 of 2)
Definitions in Dictionary
DEF name.
 02 last-name PIC X(10).
 02 first-name PIC X(20).
END
DEF ordernum PIC 9(3) HEADING 
 "Order #".
DEF orddate TYPE SQL DATETIME YEAR TO DAYHEADING
 "OrderDate".
DEF ordinterval TYPE SQL INTERVAL MONTH 2 HEADING "Order
 Interval".
DEF deldate TYPE SQL DATE HEADING"Delivery 
 Date".










