The COBOL standard (ISO/IEC 1989:2014) states that the declaration of constants is permitted in the SCREEN SECTION of the DATA DIVISION, but GNU Cobol does but permit them there. Constants can be quite handy in the SCREEN SECTION. A workaround is to put them in the WORKING STORAGE SECTION, but that is remote and less explicit.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Anon, can you please create a minimal example that does not compile with GnuCOBOL so we may inspect that? GnuCOBOL's parser explicit allow iso cobol constant entries in SCREEN SECTION.
Note: ensure you run at least with GC3, but I think that's in for quite a while...
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
The COBOL standard (ISO/IEC 1989:2014) states that the declaration of constants is permitted in the SCREEN SECTION of the DATA DIVISION, but GNU Cobol does but permit them there. Constants can be quite handy in the SCREEN SECTION. A workaround is to put them in the WORKING STORAGE SECTION, but that is remote and less explicit.
Suggest you read the PG manual and look at the VALUE clause.
Anon, can you please create a minimal example that does not compile with GnuCOBOL so we may inspect that? GnuCOBOL's parser explicit allow iso cobol constant entries in
SCREEN SECTION.Note: ensure you run at least with GC3, but I think that's in for quite a while...