Cobol: Accept ASSIGN TO DEVICE clause.
Cobol compiler now supports the ASSIGN TO DEVICE clause for flexible file and device handling.
The GCC Cobol compiler now accepts the ASSIGN TO DEVICE clause in file-handling statements. This allows device names specified in the SELECT statement to refer to implementation-defined devices, in addition to existing runtime environment variables. New warnings have been introduced to manage dialect variations related to this feature.
In Details
This change extends the COBOL front-end to parse and process the ASSIGN TO DEVICE clause, permitting implementation-defined device names beyond environment variables for file association. New diagnostic IDs and parsing logic in parse.y, cobol1.cc, and cbldiag.h handle this, along with documentation updates and new language options.
- ASSIGN TO DEVICE
- A clause in COBOL used in the
SELECTstatement to specify the assignment of a logical file name to a physical device or external file. The 'DEVICE' keyword allows for implementation-specific interpretations. - SELECT statement
- In COBOL, a statement used to associate a logical file name with a physical file or device, and to specify file attributes and access modes.
- dialect variations
- Differences in syntax, features, or semantics between different implementations or versions of a programming language.
- runtime environment variable
- A variable whose value is set outside the program, typically in the operating system's environment, and can be accessed by the program during execution.