User-defined words

A user-defined word is a COBOL word that must be supplied by the user to satisfy the format of a clause or statement.

The following sets of user-defined words are supported. The second column indicates whether DBCS characters are allowed in words of a given set.

User-defined word DBCS characters allowed?
Alphabet-name Yes
Class-name (of data) Yes
Condition-name Yes
Data-name Yes
File-name Yes
Index-name Yes
Level-numbers: 0149, 66, 77, 88 No
Library-name No
Mnemonic-name Yes
Object-oriented class-name No
Paragraph-name Yes
Priority-numbers: 0099 No
Program-name No
Record-name Yes
Section-name Yes
Symbolic-character Yes
Text-name No
XML-schema-name Yes

The maximum length of a user-defined word is 30 bytes, except for level-numbers and priority-numbers. Level-numbers and priority numbers must each be a one-digit or two-digit integer.

A given user-defined word can belong to only one of these sets, except that a given number can be both a priority-number and a level-number. Each user-defined word within a set must be unique, except for priority-numbers and level-numbers and except as specified in Referencing data names, copy libraries, and PROCEDURE DIVISION names.

The following types of user-defined words can be referenced by statements and entries in the program in which the user-defined word is declared:

  • Paragraph-name
  • Section-name

The following types of user-defined words can be referenced by any COBOL program, provided that the compiling system supports the associated library or other system and that the entities referenced are known to that system:

  • Library-name
  • Text-name

The following types of names, when they are declared within a configuration section, can be referenced by statements and entries in the program that contains the configuration section or in any program contained within that program:

  • Alphabet-name
  • Class-name
  • Condition-name
  • Mnemonic-name
  • Symbolic-character
  • XML-schema-name

The function of each user-defined word is described in the clause or statement in which it appears.

Related references  
Context-sensitive words