Probably best to demonstrate the problem with an example.
logger.cbl is a COBOL program that imports a copybook logger.cpy, using a COPY directive with the REPLACING clause. However, when I generate a listing (logger.lst), the listing does show the generated identifiers. I'm expecting the report to contain the generated variable names, such as:
******************************************************************
* logger: Linkage record layout for logger program *
******************************************************************
01 log-record.
10 log-source pic x(32).
88 log-no-source value spaces.
10 log-request pic x(01) value space.
88 log-init-log value 'I'.
88 log-write-log value space.
88 log-close-log value 'C'.
10 filler pic x(35).
10 log-log-text.
15 filler pic x(01) value '['.
15 filler.
20 log-year pic 9(04).
20 filler pic x(01) value '-'.
20 log-month pic 9(02).
20 filler pic x(01) value '-'.
20 log-day pic 9(02).
20 filler pic x(01) value space.
20 log-hour pic 9(02).
20 filler pic x(01) value '-'.
20 log-minute pic 9(02).
20 filler pic x(01) value '-'.
20 log-second pic 9(02).
20 filler pic x(01) value '-'.
20 log-hundredths pic 9(02).
15 filler pic x(05) value '] : '.
15 log-text pic x(4000).
What I see in the listing is that every variable name from the copybook becomes log. The program compiles without any errors, so clearly the compiler is generating the substitutions correctly.
Is this a known issue with the compiler? Is there a plan to fix it? Is there a workaround?
I have never seen this issue when compiling with the Micro Focus COBOL compiler.
I am using GNUCOBOL version 3.1.2.0 on Linux Mint 20.3 with the Cinnamon desktop.
Suggest you upgrade the compiler to v3.2 rc-2 and retry your example
with a copy of the source file submitted here if it is still not
producing full o/p.
I am assuming here you are NOT using any of the option types such as
SUPPRESS PRINTING or >>LISTING OFF, etc, that will reduce listed
expansion of the copybooks. but please also provide the command given to
cobc when compiling.
I recommend that you register on sourceforge and then log in when
posting otherwise your post will be queued until some one moderates your
posts which could be some days as it is a manual process.
Vince
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Have you searched the discussion for replacing issues? I seem to recall there were some discussions.
If you register, your posts wont set out waiting for a Mod to ok it.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
For Windows etc, here are the details from Arnold Trembley :
Here are the newest GnuCOBOL 3.2 Release Candidate 2 (10Feb2023) download binaries built with MinGW Gnu Compiler Collection 9.2.0. GnuCOBOL 3.2 includes PDCursesMod 4.3.5/wincon. It also includes GCSORT.EXE and support for the COBOL ReportWriter. You can download a 7-Zip binary and rename the file extension from "7z" to "exe", and run it as a self-installing archive. Then see the STARTHERE.txt file, or open a cmd.exe window in the install folder, and run "set_env.cmd" to set the environment variables.
The compressed binaries build with the older 32-bit MinGW toolchain are about 30 megabytes each, and expand to about 160 Megabytes when installed.
You have a choice of versions using Oracle Berkeley DataBase (BDB) for ISAM support, or VBISAM 2.1.1 (VBI) for ISAM support, or NODB for a compile without any Indexed Sequential Access Method. Note that VBISAM has been upgraded from 2.0.1 to 2.1.1.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Probably best to demonstrate the problem with an example.
logger.cbl is a COBOL program that imports a copybook logger.cpy, using a COPY directive with the REPLACING clause. However, when I generate a listing (logger.lst), the listing does show the generated identifiers. I'm expecting the report to contain the generated variable names, such as:
What I see in the listing is that every variable name from the copybook becomes log. The program compiles without any errors, so clearly the compiler is generating the substitutions correctly.
Is this a known issue with the compiler? Is there a plan to fix it? Is there a workaround?
I have never seen this issue when compiling with the Micro Focus COBOL compiler.
I am using GNUCOBOL version 3.1.2.0 on Linux Mint 20.3 with the Cinnamon desktop.
Thanks for your help.
Suggest you upgrade the compiler to v3.2 rc-2 and retry your example
with a copy of the source file submitted here if it is still not
producing full o/p.
I am assuming here you are NOT using any of the option types such as
SUPPRESS PRINTING or >>LISTING OFF, etc, that will reduce listed
expansion of the copybooks. but please also provide the command given to
cobc when compiling.
I recommend that you register on sourceforge and then log in when
posting otherwise your post will be queued until some one moderates your
posts which could be some days as it is a manual process.
Vince
Have you searched the discussion for replacing issues? I seem to recall there were some discussions.
If you register, your posts wont set out waiting for a Mod to ok it.
Forgot to add announcement info for the v3.2 rc-2 release and location to obtain it :
The release of GnuCOBOL 3.2 is imminent.
Please help to make this release as good as possible by downloading
and testing this release candidate.
You can find the source downloads as always on gnu.org and on the SourceForge mirror:
https://alpha.gnu.org/gnu/gnucobol/gnucobol-3.2-rc2.tar.lz
https://alpha.gnu.org/gnu/gnucobol/gnucobol-3.2-rc2.tar.gz
https://alpha.gnu.org/gnu/gnucobol/gnucobol-3.2-rc2.tar.xz
https://alpha.gnu.org/gnu/gnucobol/gnucobol-3.2-rc2.tar.bz2
https://alpha.gnu.org/gnu/gnucobol/gnucobol-3.2-rc2_win.7z
https://sourceforge.net/projects/gnucobol/files/gnucobol/3.2/
For Windows etc, here are the details from Arnold Trembley :
Here are the newest GnuCOBOL 3.2 Release Candidate 2 (10Feb2023) download binaries built with MinGW Gnu Compiler Collection 9.2.0. GnuCOBOL 3.2 includes PDCursesMod 4.3.5/wincon. It also includes GCSORT.EXE and support for the COBOL ReportWriter. You can download a 7-Zip binary and rename the file extension from "7z" to "exe", and run it as a self-installing archive. Then see the STARTHERE.txt file, or open a cmd.exe window in the install folder, and run "set_env.cmd" to set the environment variables.
https://www.arnoldtrembley.com/GC32-BDB-rc2-rename-7z-to-exe.7z
https://www.arnoldtrembley.com/GC32-VBI-rc2-rename-7z-to-exe.7z
https://www.arnoldtrembley.com/GC32-NODB-rc2-rename-7z-to-exe.7z
https://www.arnoldtrembley.com/GnuCOBOL-3.2-MinGW-Build-Guide-V1.6.pdf
https://www.arnoldtrembley.com/GnuCOBOL-3.2-MinGW-Build-Guide-V1.6.docx
The compressed binaries build with the older 32-bit MinGW toolchain are about 30 megabytes each, and expand to about 160 Megabytes when installed.
You have a choice of versions using Oracle Berkeley DataBase (BDB) for ISAM support, or VBISAM 2.1.1 (VBI) for ISAM support, or NODB for a compile without any Indexed Sequential Access Method. Note that VBISAM has been upgraded from 2.0.1 to 2.1.1.