Appendix D: COBOL Reserved Words

Reserved words in COBOL cannot be used as programmer-defined names — data names, paragraph names, section names, or file names. Using a reserved word as an identifier causes a compilation error that can be baffling, especially when the word seems perfectly ordinary (like DATE, COUNT, or REFERENCE). This appendix provides a comprehensive listing to help you avoid these collisions and understand which words were introduced in newer standards.


D.1 How to Use This Reference

Every COBOL compiler maintains its own reserved word list, which may differ slightly from the standard. IBM Enterprise COBOL, Micro Focus Visual COBOL, and GnuCOBOL each add vendor-specific reserved words and may not reserve every word in the 2014 standard. When in doubt:

  1. Check this list before naming a new data item or paragraph.
  2. Compile with maximum diagnostics (FLAG(I,I) on IBM) to catch conflicts immediately.
  3. Prefix your data names with a qualifier (e.g., WS-DATE instead of DATE) — this is the single most effective practice for avoiding reserved word conflicts.

Legend for the alphabetical listing:

  • 85 — Reserved in COBOL-85 (ANSI X3.23-1985)
  • 02 — Added in COBOL 2002 (ISO/IEC 1989:2002)
  • 14 — Added in COBOL 2014 (ISO/IEC 1989:2014)
  • Words without a tag have been reserved since at least COBOL-74.

D.2 Complete Alphabetical Listing

A

ACCEPT | ACCESS | ACTIVE-CLASS (02) | ADD | ADDRESS | ADVANCING | AFTER | ALIGNED (02) | ALL | ALLOCATE (14) | ALPHABET (85) | ALPHABETIC | ALPHABETIC-LOWER (85) | ALPHABETIC-UPPER (85) | ALPHANUMERIC (85) | ALPHANUMERIC-EDITED (85) | ALSO | ALTER | ALTERNATE | AND | ANY | ANYCASE (14) | ARE | AREA | AREAS | ASCENDING (85) | ASSIGN | AT | AUTHOR

B

B-AND (14) | B-NOT (14) | B-OR (14) | B-XOR (14) | BASED (85) | BEFORE | BEGINNING (85) | BINARY (85) | BINARY-CHAR (02) | BINARY-DOUBLE (02) | BINARY-LONG (02) | BINARY-SHORT (02) | BIT (02) | BLANK | BLOCK | BOOLEAN (02) | BOTTOM | BY

C

CALL | CANCEL | CD | CF | CH | CHARACTER | CHARACTERS | CLASS (85) | CLASS-ID (02) | CLOCK-UNITS | CLOSE | COBOL | CODE | CODE-SET | COLLATING | COLUMN | COMMA | COMMON (85) | COMMUNICATION | COMP | COMP-1 | COMP-2 | COMP-3 | COMP-4 | COMP-5 | COMPUTATIONAL | COMPUTATIONAL-1 | COMPUTATIONAL-2 | COMPUTATIONAL-3 | COMPUTATIONAL-4 | COMPUTATIONAL-5 | COMPUTE | CONDITION (02) | CONFIGURATION | CONSTANT (14) | CONTAINS | CONTENT (85) | CONTINUE (85) | CONTROL | CONTROLS | CONVERTING (85) | COPY | CORR | CORRESPONDING | COUNT | CURRENCY | CURSOR (85)

D

DATA | DATA-POINTER (02) | DATE | DATE-COMPILED | DATE-WRITTEN | DAY | DAY-OF-WEEK (85) | DE | DEBUGGING | DECIMAL-POINT | DECLARATIVES | DEFAULT (02) | DELETE | DELIMITED (85) | DELIMITER (85) | DEPENDING | DESCENDING (85) | DESTINATION | DETAIL | DISABLE | DISPLAY | DISPLAY-1 | DIVIDE | DIVISION | DOWN | DUPLICATES | DYNAMIC (85)

E

EBCDIC | EC (02) | EGI | ELSE | EMI | ENABLE | END | END-ACCEPT (85) | END-ADD (85) | END-CALL (85) | END-COMPUTE (85) | END-DELETE (85) | END-DISPLAY (85) | END-DIVIDE (85) | END-EVALUATE (85) | END-IF (85) | END-INVOKE (02) | END-MULTIPLY (85) | END-OF-PAGE | END-PERFORM (85) | END-READ (85) | END-RECEIVE (85) | END-RETURN (85) | END-REWRITE (85) | END-SEARCH (85) | END-SEND (85) | END-START (85) | END-STRING (85) | END-SUBTRACT (85) | END-UNSTRING (85) | END-WRITE (85) | ENDING (85) | ENTRY | ENVIRONMENT | EO (02) | EOP | EQUAL | ERROR | ESI | EVALUATE (85) | EVERY | EXCEPTION | EXCEPTION-OBJECT (02) | EXCLUSIVE (02) | EXIT | EXTEND | EXTERNAL (85)

F

FACTORY (02) | FALSE (85) | FD | FILE | FILE-CONTROL | FILLER | FINAL | FIRST | FLOAT-BINARY-128 (14) | FLOAT-BINARY-32 (14) | FLOAT-BINARY-64 (14) | FLOAT-DECIMAL-16 (14) | FLOAT-DECIMAL-34 (14) | FLOAT-EXTENDED (02) | FLOAT-INFINITY (14) | FLOAT-LONG (02) | FLOAT-NOT-A-NUMBER (14) | FLOAT-SHORT (02) | FOOTING | FOR | FORMAT (02) | FREE (14) | FROM | FUNCTION (85) | FUNCTION-ID (02) | FUNCTION-POINTER (14)

G

GENERATE | GET (02) | GIVING | GLOBAL (85) | GO | GOBACK | GREATER | GROUP | GROUP-USAGE (02)

H

HEADING | HIGH-VALUE | HIGH-VALUES

I

I-O | I-O-CONTROL | ID (85) | IDENTIFICATION | IF | IMPLEMENTOR (02) | IN | INDEX | INDEXED | INDICATE | INHERITS (02) | INITIAL | INITIALIZE (85) | INITIATE | INPUT | INPUT-OUTPUT | INSPECT | INSTALLATION | INTERFACE (02) | INTERFACE-ID (02) | INTO | INVALID | INVOKE (02) | IS

J

JSON (14) | JUST | JUSTIFIED

K

KANJI | KEY

L

LABEL | LAST | LEADING | LEFT | LENGTH | LESS | LIMIT | LIMITS | LINAGE | LINAGE-COUNTER | LINE | LINE-COUNTER | LINES | LINKAGE | LOCAL-STORAGE (02) | LOCALE (02) | LOCK | LOW-VALUE | LOW-VALUES

M

MEMORY | MERGE | MESSAGE | METHOD (02) | METHOD-ID (02) | MINUS | MODE | MODULES | MORE-LABELS | MOVE | MULTIPLE | MULTIPLY

N

NATIONAL (02) | NATIONAL-EDITED (02) | NATIVE | NEGATIVE | NESTED (85) | NEXT | NO | NOT | NULL (85) | NULLS (85) | NUMBER | NUMERIC | NUMERIC-EDITED (85)

O

OBJECT (02) | OBJECT-COMPUTER | OBJECT-REFERENCE (02) | OCCURS | OF | OFF | OMITTED | ON | OPEN | OPTIONAL | OPTIONS (02) | OR | ORDER (85) | ORGANIZATION | OTHER (85) | OUTPUT | OVERFLOW | OVERRIDE (02)

P

PACKED-DECIMAL (85) | PADDING (85) | PAGE | PAGE-COUNTER | PARAGRAPH (02) | PERFORM | PF | PH | PIC | PICTURE | PLUS | POINTER (85) | POSITION | POSITIVE | PRESENT (02) | PRINTING | PROCEDURE | PROCEDURE-POINTER | PROCEDURES | PROCEED | PROGRAM | PROGRAM-ID | PROGRAM-POINTER (02) | PROPERTY (02) | PROTOTYPE (02) | PURGE

Q

QUEUE | QUOTE | QUOTES

R

RAISE (02) | RAISING (02) | RANDOM | RD | READ | RECEIVE | RECORD | RECORDING | RECORDS | RECURSIVE (02) | REDEFINES | REEL | REFERENCE (85) | REFERENCES | RELATION (02) | RELATIVE | RELEASE | REMAINDER | REMOVAL | RENAMES | REPLACE (85) | REPLACING | REPORT | REPORTING | REPORTS | REPOSITORY (02) | REPRESENTS-NOT-A-NUMBER (14) | RERUN | RESERVE | RESET | RESUME (02) | RETRY (02) | RETURN | RETURN-CODE | RETURNING (85) | REVERSED | REWIND | REWRITE | RF | RH | RIGHT | ROUNDED | RUN

S

SAME | SCREEN (85) | SD | SEARCH | SECTION | SECURITY | SEGMENT | SEGMENT-LIMIT | SELECT | SELF (02) | SEND | SENTENCE | SEPARATE | SEQUENCE | SEQUENTIAL | SET | SHARING (02) | SIGN | SIZE | SORT | SORT-MERGE | SORT-RETURN | SOURCE | SOURCE-COMPUTER | SOURCES (02) | SPACE | SPACES | SPECIAL-NAMES | STANDARD | STANDARD-1 | STANDARD-2 | START | STATEMENT (02) | STATUS | STOP | STRING | STRONG (02) | SUB-QUEUE-1 | SUB-QUEUE-2 | SUB-QUEUE-3 | SUBTRACT | SUM | SUPER (02) | SUPPRESS | SYMBOL | SYMBOLIC | SYNC | SYNCHRONIZED | SYSTEM-DEFAULT (02)

T

TABLE | TALLYING | TAPE | TERMINAL | TERMINATE | TEST (85) | TEXT | THAN | THEN (85) | THROUGH | THRU | TIME | TIMES | TO | TOP | TRAILING | TRUE (85) | TURN (02) | TYPE (02) | TYPEDEF (02)

U

UNIT | UNIVERSAL (02) | UNLOCK (02) | UNSTRING | UNTIL | UP | UPON | USAGE | USE | USER-DEFAULT (02) | USING

V

VAL-STATUS (02) | VALID (02) | VALIDATE (02) | VALIDATE-STATUS (02) | VALUE | VALUES | VARYING

W

WHEN | WITH | WORDS | WORKING-STORAGE | WRITE

X

XML (02) | XML-DECLARATION (02) | XML-SCHEMA (02)

Z

ZERO | ZEROES | ZEROS


D.3 Reserved Words by Category

D.3.1 Data Description

BINARY | BLANK | COMP | COMP-1 | COMP-2 | COMP-3 | COMP-4 | COMP-5 | COMPUTATIONAL | DISPLAY | EXTERNAL | FILLER | GLOBAL | GROUP-USAGE | INDEXED | JUSTIFIED | JUST | NATIONAL | OCCURS | PACKED-DECIMAL | PIC | PICTURE | POINTER | REDEFINES | RENAMES | SIGN | SYNC | SYNCHRONIZED | USAGE | VALUE | VALUES

D.3.2 Procedure Division Verbs

ACCEPT | ADD | ALTER | CALL | CANCEL | CLOSE | COMPUTE | CONTINUE | DELETE | DISPLAY | DIVIDE | EVALUATE | EXIT | FREE | GENERATE | GO | GOBACK | IF | INITIALIZE | INITIATE | INSPECT | INVOKE | MERGE | MOVE | MULTIPLY | OPEN | PERFORM | RAISE | READ | RECEIVE | RELEASE | RETURN | REWRITE | SEARCH | SEND | SET | SORT | START | STOP | STRING | SUBTRACT | SUPPRESS | TERMINATE | UNLOCK | UNSTRING | VALIDATE | WRITE

D.3.3 File I/O

ACCESS | ALTERNATE | ASSIGN | BLOCK | CLOSE | CODE-SET | DATA | DELETE | DYNAMIC | EXTEND | FD | FILE | FILE-CONTROL | I-O | INPUT | INDEXED | KEY | LABEL | LINAGE | LOCK | OPEN | OPTIONAL | ORGANIZATION | OUTPUT | PADDING | RANDOM | READ | RECORD | RECORDING | RECORDS | RELATIVE | RESERVE | REWRITE | SD | SELECT | SEQUENTIAL | START | STATUS | WRITE

D.3.4 Arithmetic and Numeric

ADD | COMPUTE | CORRESPONDING | CORR | DIVIDE | GIVING | MULTIPLY | NEGATIVE | NUMERIC | ON SIZE ERROR | POSITIVE | REMAINDER | ROUNDED | SUBTRACT | SUM | ZERO | ZEROES | ZEROS

D.3.5 String Handling

DELIMITED | DELIMITER | INSPECT | REPLACING | STRING | TALLYING | UNSTRING | CONVERTING | ALL | LEADING | FIRST | CHARACTERS

D.3.6 Control Flow

ALSO | ELSE | END-EVALUATE | END-IF | END-PERFORM | EVALUATE | EXIT | GO | IF | NOT | OTHER | PERFORM | SENTENCE | TEST | THEN | THROUGH | THRU | TIMES | TRUE | FALSE | UNTIL | VARYING | WHEN

D.3.7 Object-Oriented (COBOL 2002+)

B-AND | B-NOT | B-OR | B-XOR | CLASS-ID | FACTORY | GET | INHERITS | INTERFACE | INTERFACE-ID | INVOKE | METHOD | METHOD-ID | OBJECT | OBJECT-REFERENCE | OVERRIDE | PROPERTY | PROTOTYPE | RAISE | RAISING | RESUME | SELF | SUPER | UNIVERSAL


D.4 Common Reserved Word Conflicts

These are the reserved words most likely to collide with programmer-chosen names. Each entry shows the reserved word, why it looks like a good variable name, and the recommended alternative.

Reserved Word Why It Tempts Recommended Alternative
DATE Calendar date fields WS-DATE, WS-PROCESS-DATE, TX-DATE
COUNT Counting occurrences WS-COUNT, WS-REC-COUNT, TX-COUNT
STATUS Record or account status WS-STATUS, WS-ACCT-STATUS
RECORD Record type identifier WS-RECORD-TYPE, WS-REC-ID
NUMBER Account/reference numbers WS-NUMBER, WS-ACCT-NUMBER
VALUE Monetary values WS-VALUE, WS-FIELD-VALUE, TX-AMOUNT
TIME Time values WS-TIME, WS-PROCESS-TIME
REFERENCE Reference numbers WS-REFERENCE, WS-REF-NUMBER
SOURCE Source codes WS-SOURCE, WS-SOURCE-CODE
TYPE Type codes WS-TYPE, WS-REC-TYPE, TX-TYPE
KEY Key fields WS-KEY, WS-SEARCH-KEY, TX-KEY
SIZE Size values WS-SIZE, WS-FIELD-SIZE
ORDER Order numbers/sorting WS-ORDER, WS-ORDER-NUM
POSITION Position values WS-POSITION, WS-CHAR-POSITION
CONTENT Content fields WS-CONTENT, WS-MSG-CONTENT
LENGTH Length values WS-LENGTH, WS-REC-LENGTH
MODE Processing mode WS-MODE, WS-PROCESS-MODE
REPORT Report identifiers WS-REPORT, WS-RPT-NAME
LIMIT Limit values WS-LIMIT, WS-UPPER-LIMIT
MESSAGE Message text WS-MESSAGE, WS-ERR-MESSAGE
SYMBOL Symbol codes WS-SYMBOL, WS-CURR-SYMBOL
DETAIL Detail records WS-DETAIL, WS-DTL-RECORD
MERGE Merge flags WS-MERGE-FLAG, WS-MERGE-IND
LOCK Lock indicators WS-LOCK-FLAG, WS-REC-LOCKED
COLUMN Column numbers WS-COLUMN, WS-COL-NUM
BOTTOM Bottom values WS-BOTTOM, WS-PAGE-BOTTOM
TOP Top values WS-TOP, WS-PAGE-TOP
CLASS Classification codes WS-CLASS-CODE, WS-CATEGORY
DESTINATION Routing destinations WS-DESTINATION, WS-DEST-CODE
CONTROL Control fields WS-CONTROL, WS-CTL-FIELD
ENTRY Entry points WS-ENTRY, WS-DATA-ENTRY

The universal fix: Prefix all data names with a 2-3 character qualifier indicating scope or context:

  • WS- for WORKING-STORAGE
  • LS- for LOCAL-STORAGE
  • LK- for LINKAGE SECTION
  • TX- for transaction-related fields
  • FD- or the file's abbreviation for file record fields
  • RPT- for report fields

This convention, followed by virtually every professional COBOL shop, eliminates reserved word conflicts and makes code self-documenting.


D.5 Vendor Extensions — Notable Reserved Words

D.5.1 IBM Enterprise COBOL Additions

IBM Enterprise COBOL reserves additional words beyond the standard:

Word Purpose
COMP-5 Native binary (full range)
DISPLAY-1 DBCS display
EGCS Extended Graphic Character Set
ENTRY Alternate entry point
GOBACK Return to caller
JSON JSON GENERATE/PARSE
KANJI Kanji character class
MORE-LABELS Multi-volume label processing
NATIONAL Unicode (UTF-16)
NATIONAL-EDITED Edited Unicode
PASSWORD VSAM password
PROCEDURE-POINTER Procedure pointer type
RECORDING Recording mode
RETURN-CODE Special register
SERVICE Service routines
SHIFT-IN DBCS shift character
SHIFT-OUT DBCS shift character
SORT-CONTROL Sort control special register
SORT-CORE-SIZE Sort memory register
SORT-FILE-SIZE Sort file size register
SORT-MESSAGE Sort message register
SORT-MODE-SIZE Sort mode register
SORT-RETURN Sort return code register
TALLY Special register
WHEN-COMPILED Special register
XML XML GENERATE/PARSE
XML-CODE XML special register
XML-EVENT XML special register
XML-NTEXT XML national text register
XML-TEXT XML text register

D.5.2 Micro Focus Visual COBOL Additions

Micro Focus adds several extensions:

Word Purpose
ACCEPT (extended) GUI ACCEPT with screen positioning
BACKGROUND-COLOR Screen section color
BELL Terminal bell
BLINK Blinking display attribute
CHAIN Command-line chaining
COLOR Screen color attribute
FOREGROUND-COLOR Screen section color
FULL Full-field validation
GRID Screen grid attribute
HIGHLIGHT Bright display attribute
LOWLIGHT Dim display attribute
REQUIRED Mandatory field
REVERSE-VIDEO Reverse display attribute
SCREEN Screen section
SECURE Password-style input
UNDERLINE Underline display attribute

D.5.3 GnuCOBOL Additions

GnuCOBOL generally follows the Micro Focus conventions and adds:

Word Purpose
AUTO Auto-tab on screen input
AWAY-FROM-ZERO Rounding mode
BINARY-C-LONG C long integer
BINARY-CHAR 1-byte binary
BINARY-DOUBLE 8-byte binary
BINARY-LONG 4-byte binary
BINARY-SHORT 2-byte binary
FLOAT-BINARY-32 IEEE single float
FLOAT-BINARY-64 IEEE double float
FLOAT-DECIMAL-16 IEEE decimal64
FLOAT-DECIMAL-34 IEEE decimal128
NEAREST-AWAY-FROM-ZERO Rounding mode
NEAREST-EVEN Banker's rounding
NEAREST-TOWARD-ZERO Rounding mode
TOWARD-GREATER Rounding mode
TOWARD-LESSER Rounding mode
TRUNCATION Rounding mode

D.5.4 Checking Your Compiler

To determine the exact reserved word list for your compiler:

  • IBM Enterprise COBOL: See the Language Reference manual, Appendix E. Or compile a test program with the intended name; the compiler will issue IGYDS1089-S if it conflicts.
  • Micro Focus: Use the MFLEVEL directive to control which standard's reserved words are active. MFLEVEL"19" uses the most current list.
  • GnuCOBOL: Use the -std flag to select the standard (cobol85, cobol2002, cobol2014, ibm, mf). Reserved words vary by standard selection. Use cobc --list-reserved to see the full list for your current configuration.

D.6 Context-Sensitive Words

Some words in COBOL 2002 and later are context-sensitive — they are reserved only when they appear in specific syntactic positions. Outside those positions, they can be used as programmer-defined names. This was introduced to reduce the burden of the ever-growing reserved word list.

Examples of context-sensitive words in COBOL 2014:

Word Reserved When Used As Free to Use As Data Name?
ARITHMETIC Compiler option context Yes
ATTRIBUTE XML context Yes
AUTO Screen section Depends on compiler
AWAY-FROM-ZERO ROUNDED phrase Yes
CYCLE EXIT PERFORM CYCLE Yes
ELEMENT XML context Yes
FLOAT-INFINITY Literal context Yes
NEAREST-EVEN ROUNDED phrase Yes
PARAGRAPH EXIT PARAGRAPH Yes
PREFIXED USAGE context Yes
YYYYDDD ACCEPT FROM DATE Yes
YYYYMMDD ACCEPT FROM DATE Yes

Practical advice: Even though context-sensitive words are technically allowed as data names, avoid using them. Future compiler versions, porting between compilers, and the confusion of maintenance programmers all argue for steering clear. The two-character prefix convention (WS-, LS-, etc.) costs nothing and prevents all of these problems.


D.7 Total Reserved Word Counts by Standard

Standard Approximate Count Notes
COBOL-68 ~200 First ANSI standard
COBOL-74 ~280 Added structured programming features
COBOL-85 ~350 Major modernization (END-IF, EVALUATE, inline PERFORM)
COBOL 2002 ~450 Object orientation, exceptions, Unicode
COBOL 2014 ~500+ JSON, ALLOCATE/FREE, additional rounding modes
IBM Enterprise COBOL V6 ~520 Standard + IBM extensions
Micro Focus Visual COBOL ~480 Standard + screen section + extensions
GnuCOBOL 3.x ~550 Broadest reserved word list (covers multiple dialects)

The growth of the reserved word list is one reason the COBOL standards committee introduced context-sensitive words in 2002 — without them, the list would be even larger, and more existing programs would break when compiled under newer standards.


This appendix covers the reserved words most relevant to the intermediate COBOL programmer. For the definitive list for your specific compiler, always consult the compiler's language reference manual or use the compiler's own diagnostic facilities. The few minutes spent checking a name before coding can save hours of debugging cryptic compilation errors.