Category descriptions

The category of a data item is established by the attributes of its data description entry (such as its PICTURE character-string or USAGE clause) or by its function definition.

The meaning of each category is given below.

Alphabetic

A data item is described as category alphabetic by its PICTURE character-string. For PICTURE character-string details, see Alphabetic items.

A data item of category alphabetic is referred to as an alphabetic data item.

Alphanumeric

Each of the following data items is of category alphanumeric:

  • An elementary data item described as alphanumeric by its PICTURE character-string. For PICTURE character-string details, see Alphanumeric items.
  • An alphanumeric group item.
  • An alphanumeric function.
  • The following special registers:
    • DEBUG-ITEM
    • SHIFT-OUT
    • SHIFT-IN
    • SORT-CONTROL
    • SORT-MESSAGE
    • WHEN-COMPILED
    • XML-EVENT
    • XML-TEXT

Alphanumeric-edited

A data item is described as category alphanumeric-edited by its PICTURE character-string. For PICTURE character-string details, see Alphanumeric-edited items.

A data item of category alphanumeric-edited is referred to as an alphanumeric-edited data item.

DBCS

A data item is described as category DBCS by its PICTURE character-string and the NSYMBOL(DBCS) compiler option or by an explicit USAGE DISPLAY-1 clause. For PICTURE character-string details, see DBCS items.

A data item of category DBCS is referred to as a DBCS data item.

External floating-point

A data item is described as category external floating-point by its PICTURE character-string. For PICTURE character-string details, see External floating-point items. An external floating-point data item can be described with USAGE DISPLAY or USAGE NATIONAL.

When the usage is DISPLAY, the item is referred to as a display floating-point data item.

When the usage is NATIONAL, the item is referred to as a national floating-point data item.

An external floating-point data item is of class numeric and, unless specifically excluded, is included in a reference to a numeric data item.

Internal floating-point

A data item is described as category internal floating-point by a USAGE clause with the COMP-1 or COMP-2 phrase.

A data item of category internal floating-point is referred to as an internal floating-point data item. An internal floating-point data item is of class numeric and, unless specifically excluded, is included in a reference to a numeric data item.

National

Each of the following data items is of category national:

  • A data item that is described as category national by its PICTURE character-string and the NSYMBOL(NATIONAL) compiler option or by an explicit USAGE NATIONAL clause. For PICTURE character-string details, see National items.
  • A group item explicitly or implicitly described with a GROUP-USAGE NATIONAL clause.
  • A national function.
  • The special register XML-NTEXT.

National-edited

A data item is described as category national-edited by its PICTURE character-string. For PICTURE character-string details, see National-edited items.

A data item of category national-edited is referred to as a national-edited data item.

Numeric

Each of the following data items is of category numeric:

  • An elementary data item described as numeric by its PICTURE character-string and not described with a BLANK WHEN ZERO clause. For PICTURE character-string details, see Numeric items.
  • An elementary data item described with one of the following usages:
    • BINARY, COMPUTATIONAL, COMPUTATIONAL-4, COMPUTATIONAL-5, COMP, COMP-4, or COMP-5
    • PACKED-DECIMAL, COMPUTATIONAL-3, or COMP-3
  • A special register of numeric type:
    • JSON-CODE
    • Start of changeJSON-STATUSEnd of change
    • LENGTH OF
    • LINAGE-COUNTER
    • RETURN-CODE
    • SORTCORE-SIZE
    • SORT-FILE-SIZE
    • SORT-MODE-SIZE
    • SORT-RETURN
    • TALLY
    • XML-CODE
  • A numeric function.
  • An integer function.

A data item of category numeric is referred to as a numeric data item.

Numeric-edited

Each of the following data items is of category numeric-edited:

  • A data item described as numeric-edited by its PICTURE character-string. For PICTURE character-string details, see Numeric-edited items.
  • A data item described as numeric by its PICTURE character-string and described with a BLANK WHEN ZERO clause.