CUCO key terms
CUCO · Get comfortable with the vocabulary.
- IDENTIFICATION DIVISION
- Related: PROGRAM-ID, Divisions
The first of the four COBOL divisions, holding program metadata such as PROGRAM-ID, AUTHOR, and DATE-WRITTEN. It is required and must precede all other divisions in a source program.
- PROGRAM-ID
- Related: IDENTIFICATION DIVISION, CALL Statement
The paragraph inside the IDENTIFICATION DIVISION that names a program. The name links a main program to its load module and lets CALL statements and the operating system refer to it.
- Divisions
- Related: IDENTIFICATION DIVISION, DATA DIVISION, PROCEDURE DIVISION
The four top-level sections of a COBOL program: IDENTIFICATION, ENVIRONMENT, DATA, and PROCEDURE. Each has a fixed order, and only the PROCEDURE DIVISION contains executable statements.
- ENVIRONMENT DIVISION
- Related: FILE-CONTROL, SELECT Statement
The division that maps the program to its machine environment. It contains CONFIGURATION SECTION (source and object computers) and INPUT-OUTPUT SECTION, where files are assigned to external data sets.
- PROCEDURE DIVISION
- Related: Paragraph, PERFORM Statement
The division holding executable logic. It is organised into paragraphs and sections, and it contains statements that move data, branch, loop, call subprograms, and perform input/output.
- DATA DIVISION
- Related: WORKING-STORAGE SECTION, PICTURE Clause, Level Numbers
The division that declares every data item the program uses, grouped into FILE, WORKING-STORAGE, LOCAL-STORAGE, and LINKAGE sections. Each item is described by level number, name, and PICTURE or USAGE clause.
- WORKING-STORAGE SECTION
- Related: LOCAL-STORAGE SECTION, VALUE Clause
A DATA DIVISION section for variables that persist for the entire run of a program. Items are allocated and initialised once when the program is first loaded, and they retain values across calls.
- LOCAL-STORAGE SECTION
- Related: WORKING-STORAGE SECTION, LINKAGE SECTION
A DATA DIVISION section whose items are allocated and initialised each time the program is entered. It is used for working data that must not carry over between separate invocations of a subprogram.
- LINKAGE SECTION
- Related: CALL Statement, BY REFERENCE
A DATA DIVISION section describing data passed from a calling program to a subprogram. Items have no storage of their own; they are mapped onto the parameters named in the subprogram's PROCEDURE DIVISION header.
- Level Numbers
- Related: Group Item, ELEMENTARY Item, Eighty-Eight Level
Two-digit numbers at the start of a data description that show hierarchy. Levels 01 through 49 group items into records and fields, 66 names RENAMES, 77 defines a standalone item, and 88 defines condition names.
- PICTURE Clause
- Related: USAGE Clause, ELEMENTARY Item
A clause that defines the character type and size of an elementary item. Symbols such as 9 for digits, X for any character, V for an implied decimal point, and S for sign describe its format.
- USAGE Clause
- Related: PICTURE Clause, COMP-3
A clause that specifies how an item is stored: DISPLAY for character form, COMP or COMP-3 for binary and packed-decimal numeric form, and COMP-1 or COMP-2 for floating point.
- COMP-3
- Related: USAGE Clause, MOVE Statement
A USAGE that stores a numeric item in packed-decimal format, two digits per byte plus a sign nibble. It saves space and is common in files and databases, but it cannot be displayed directly without conversion.
- Group Item
- Related: Level Numbers, ELEMENTARY Item
A data item that contains subordinate items beneath it, identified by a level number lower than its children. It has no PICTURE and can be moved or compared as a single alphanumeric unit.
- ELEMENTARY Item
- Related: Group Item, PICTURE Clause
A data item with no subordinate items, defined by a PICTURE clause or an index usage. It is the smallest addressable unit in a record and holds a single value.
- REDEFINES Clause
- Related: Group Item, Level Numbers
A clause that lets two or more data descriptions occupy the same storage area. Only one interpretation is valid at a time, and the redefining item must have the same level and must not be longer than the original.
- Eighty-Eight Level
- Related: Level Numbers, IF Statement
A special level number that attaches a condition name to a data item. The condition name can then be tested directly, as in IF record-status-ok, instead of comparing the item to a literal value.
- OCCURS Clause
- Related: Subscript, SEARCH Statement, INDEXED BY
A clause that repeats a data description a fixed number of times, creating a table. Subscripts or indexes select an occurrence, and the clause may include ASCENDING or DESCENDING KEY phrases for searching.
- Subscript
- Related: OCCURS Clause, Index
A numeric value in parentheses after a table name that selects one occurrence of an OCCURS item. It may be a literal, a data name, or an arithmetic expression, and it counts from one.
- Index
- Related: Subscript, SEARCH Statement, INDEXED BY
A binary offset value associated with a table through the INDEXED BY phrase. It is used with SET, SEARCH, and PERFORM VARYING, and it is faster than a subscript because no conversion is needed.
- INDEXED BY
- Related: Index, SEARCH Statement
A phrase in the OCCURS clause that declares one or more index names for a table. The indexes are allocated with the table and can be manipulated with SET and used in SEARCH statements.
- MOVE Statement
- Related: COMP-3, Group Item
The statement that copies data from a sending item to one or more receiving items. Rules differ for numeric and alphanumeric moves, and group moves treat the sending item as alphanumeric.
- IF Statement
- Related: Eighty-Eight Level, EVALUATE Statement
A conditional statement that runs one set of statements when a condition is true and an optional ELSE set when it is false. Conditions may use comparisons, condition names, or logical operators AND, OR, and NOT.
- EVALUATE Statement
- Related: IF Statement, GO TO Statement
A multi-branch selection statement similar to a case construct. It compares one or more subjects against WHEN phrases, supports ranges and conditions, and can express logic that would otherwise need nested IF statements.
- PERFORM Statement
- Related: PERFORM VARYING, Paragraph
The statement that executes a paragraph, section, or inline statement block and then returns control. It supports repetition through TIMES, UNTIL, and VARYING phrases, giving COBOL its main looping construct.
- PERFORM VARYING
- Related: PERFORM Statement, Index
A PERFORM form that runs a routine repeatedly while incrementing a counter or index, optionally testing a condition before or after each pass. It is the standard way to walk through a table.
- GO TO Statement
- Related: Paragraph, PERFORM Statement
A statement that transfers control directly to a named paragraph or section. It bypasses normal sequential flow and is discouraged in structured code except for the simple GO TO ... DEPENDING ON case.
- Paragraph
- Related: PROCEDURE DIVISION, PERFORM Statement
A named block of statements in the PROCEDURE DIVISION, identified by a paragraph name in area A. Paragraphs can be performed as routines and are the target of GO TO and PERFORM.
- FILE-CONTROL
- Related: SELECT Statement, ENVIRONMENT DIVISION
A paragraph in the ENVIRONMENT DIVISION that contains SELECT statements. Each SELECT assigns a logical file name to an external data set and names its organisation and access mode.
- SELECT Statement
- Related: FILE-CONTROL, ORGANIZATION Clause
The entry in FILE-CONTROL that links a file name used in the program to an external data set or path. It also specifies ORGANIZATION and ACCESS MODE for the file.
- ORGANIZATION Clause
- Related: SELECT Statement, VSAM
A SELECT clause that states a file's structure: SEQUENTIAL for records processed in order, INDEXED for keyed access, or RELATIVE for access by record number. It determines which I/O verbs are valid.
- FD Entry
- Related: FILE SECTION, SELECT Statement
The file description entry in the FILE SECTION that names a file and describes its record layout. It must match the SELECT name and is followed by the record's 01-level description.
- FILE SECTION
- Related: FD Entry, FILE-CONTROL
The DATA DIVISION section that declares file records through FD entries. Each FD must correspond to a SELECT in FILE-CONTROL, and the records described there receive data from READ operations.
- OPEN and CLOSE Statements
- Related: READ Statement, WRITE Statement
Verbs that make a file available for processing and release it afterwards. OPEN names the mode (INPUT, OUTPUT, I-O, or EXTEND), and CLOSE ends access and writes any pending buffers.
- READ Statement
- Related: OPEN and CLOSE Statements, FILE STATUS
The verb that retrieves the next record from an input or I-O file into its record area. For indexed files, a KEY phrase allows direct retrieval of a specific record.
- WRITE Statement
- Related: READ Statement, FILE STATUS
The verb that adds a record to an output or I-O file from its record area. For indexed files, the key must be unique and set before the write, and INVALID KEY handles duplicates.
- FILE STATUS
- Related: READ Statement, AT END
A two-character data item declared in the FILE SECTION that receives a code after every I/O operation. Values such as 00 for success and 10 for end-of-file let the program test outcomes.
- AT END
- Related: READ Statement, FILE STATUS
A phrase on the READ statement that runs specified statements when no further records exist. It is the standard way to detect end-of-file and terminate a read loop.
- VSAM
- Related: ORGANIZATION Clause, SELECT Statement
A file access method on mainframe systems whose keyed and entry-sequenced data sets are commonly processed by COBOL INDEXED and RELATIVE files. Its record structure is described through an alternate approach such as a copybook.
- CALL Statement
- Related: LINKAGE SECTION, BY REFERENCE
The verb that transfers control to a subprogram, optionally passing parameters. Control returns after the subprogram finishes, and the calling program can test a RETURN-CODE value.
- BY REFERENCE
- Related: CALL Statement, BY CONTENT
The default parameter-passing mode for CALL, where the subprogram receives the address of the caller's data. Changes made in the subprogram are visible to the caller after return.
- BY CONTENT
- Related: CALL Statement, BY REFERENCE
A CALL parameter mode that passes a copy of the data rather than its address. The subprogram cannot alter the caller's original value, which protects data from unintended changes.
- COPY Statement
- Related: Copybook, Level Numbers
A compiler-directing statement that inserts the contents of a copybook into the source at that point. It is used to share record layouts and constants across many programs.
- Copybook
- Related: COPY Statement, FD Entry
A separate source member containing reusable declarations, usually data descriptions, that is included with COPY. It keeps record layouts consistent across programs that share the same files.
- Compiler-Directing Statements
- Related: COPY Statement, Copybook
Statements beginning with COPY, REPLACE, or similar keywords that act during compilation rather than at run time. They alter the source text before the compiler translates it into object code.
- Debugging Mode
- Related: DISPLAY Statement, Compiler-Directing Statements
A compile option that activates DEBUG lines and enables tools such as the interactive debugger. It lets a developer step through statements, set breakpoints, and inspect variables during testing.
- DISPLAY Statement
- Related: Debugging Mode, FILE STATUS
A verb that writes data to the standard output device, often used for tracing and quick diagnostics. It is simple but can disturb formatted output, so it is usually removed or conditioned in production.
- Abend
- Related: FILE STATUS, Debugging Mode
An abnormal end of a running program, typically caused by an unhandled error such as a data exception or invalid file operation. Mainframe systems produce a completion code that identifies the cause.
- Structured Programming
- Related: PERFORM Statement, GO TO Statement, EVALUATE Statement
A coding style in COBOL that builds logic from sequence, selection, and iteration without arbitrary GO TO jumps. It uses PERFORM, IF, and EVALUATE to keep paragraphs single-purpose and testable.
- Intrinsic Function
- Related: EVALUATE Statement, MOVE Statement
A built-in function supplied by the compiler, such as FUNCTION UPPER-CASE or FUNCTION CURRENT-DATE, invoked with the FUNCTION keyword inside an expression. Functions return values and cannot be used as statement verbs.
- Object-Oriented COBOL
- Related: CALL Statement, Intrinsic Function
An extension of COBOL that adds classes, objects, methods, and inheritance through keywords such as CLASS-ID and METHOD-ID. It allows reuse and encapsulation while still supporting traditional procedural programs.