IBM Extension

User-Defined Data Types

A user-defined data type (or type name) is a 01 level elementary or group item that contains the TYPEDEF clause. No storage is allocated for such an item. It can be thought of as a template that describes a data name and its subordinate items. A type name can then be used to define a data name (or another type name) by specifying it within a TYPE clause. The defined data name will have the characteristics of the type name specified in the TYPE clause. If the type name is a group item, then the defined data name will be a group item with subordinate items having the same names, hierarchy, and characteristics as the items subordinate to the type name.

When defining a data name (or type name) by using a user-defined data type in a TYPE clause, only the following clauses may be used in conjunction with the TYPE clause to complete the description of the data name:
  • EXTERNAL clause
  • GLOBAL clause
  • OCCURS clause
  • TYPEDEF clause
  • VALUE clause.

The scoping rules for type names are the same as those for data names.

For more information about the TYPE and TYPEDEF clauses, refer to TYPE Clause and TYPEDEF Clause.

End of IBM Extension