GCC Newspaper
JULY 29, 2026
Date
/
Architectures
Components
Topics
News & Policy
cobol Performance Win

cobol: ACCEPT <DATE> into subscripted and reference-modified variables.

COBOL compiler enhancements for ACCEPT statement with dates and improved MOVE statement performance.

This extensive update to the COBOL compiler adds support for the ACCEPT statement when used with date functions and targetting subscripted or reference-modified variables. It also enhances the SELECT ASSIGN TO DEVICE syntax to meet specific IBM requirements and improves the execution speed of certain MOVE statements, particularly those involving intermediate variables.

In Details

The genapi.cc and parse.y components of the COBOL frontend are updated to correctly handle ACCEPT statements targeting X(N) and Y(A:B) when the source is a date function. Additionally, changes in genutil.cc, move.cc, and associated headers aim to optimize MOVE statement execution involving intermediate_e variables. SELECT ASSIGN syntax parsing is also adjusted for IBM compatibility.

For Context
ACCEPT statement
A COBOL statement used to receive data from a user, a file, or a system function into a variable. This change extends its capabilities with date functions and complex variable types.
subscripted variable
In COBOL, a variable (like an array element) accessed using one or more subscripts (indices), e.g., TABLE(3).
reference-modified variable
In COBOL, a variable accessed with a range specified, e.g., STRING(5:10) which refers to characters 5 through 14 of the string.
MOVE statement
A fundamental COBOL statement used to copy data from one data item to another. Optimizations here aim to speed up common data movement operations.
SELECT ASSIGN
A COBOL clause used to associate a file or device with a specific storage medium or external resource.
Filed Under: cobolcompilerdate handlingperformance