Open In App

COBOL Words

Last Updated : 12 Dec, 2022
Improve
Improve
Like Article
Like
Save
Share
Report

COBOL Words are characters like string that can be reserved words or user-defined words. The length can be up to 30 characters. COBOL words must be as from a set of letters, digits, the hyphen, and the underscore.

User-Defined

User-defined words are used for commonly as naming files, operational data, records, big paragraph names, and sections. Alphabets, digits also can hyphen are allowed as forming user-defined words, so cannot use COBOL reserved words.

The types of user-defined words:

Types of User-Defined Words Defining Rules
alphabet-name
class-name
condition-name
constant-name
data-name
file-name
index-name
locale-name
mnemonic-name
program-name
Each of these words must contain at least one letter
library-name
program-name
text-name
Each of these words must contain one letter. The starting 10 characters must form a unique word

Reserved Words:

Reserved words are the type predefined words in COBOL, Different types of reserved words that we use as constantly-

  • Keywords like Acceptable ADD, ACCEPT, MOVE, etc.
  • Special characters commonly words as +, -, *, <, <=, etc
  • Figurative constants are commonly unique values like ZERO, SPACES, etc. 

Figurative Constants:

Figurative Constants Description
HIGH-VALUES One or more characters that which having highest position in descending order
LOW-VALUES One or more characters that have zeros in binary representation.
ZERO/ZEROES One or more zeros depending on the size of the variable
SPACES One or more having spaces.
QUOTES Single or double quotes.
ALL literal Filled the data item with having Literal.

Like Article
Suggest improvement
Share your thoughts in the comments

Similar Reads