I have a program that uses the Report Writer module. The program works and writes the expected output. However, the DECLARATIVES don't seam to get executed. I mean the DISPLAY does not show and the value of the WS-X field in the detail is never set to "*" as specified in the Declaratives.
Is the code in the DECLARTIVES executed before printing detail group or is it only for control breaks and IO exceptions?
This all is a part of my learning. Thanks for helping.
Thank you for your help. I tried adding:
STOP "Check vdu O/P".
But It still does not display. If I use display outside DECLARTIVES, the display result show.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Thank you for your help. I tried adding:
STOP "Check vdu O/P".
But It still does not display. If I use display outside DECLARTIVES, the display result show.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Thank you for the idea and the detailed description.
I am using GNU COBOL 3.1.2.0 on Windows 10.
I did what you suggested and I guess the declaratives are not executed as you said - here is the output
Suggest you report it as a Bug via the Bug tracker but make sure you
specify the exact version of the compiler and platform you are using.
On 03/07/2021 22:09, Emmad wrote:
Thank you for the idea and the detailed description. I did what you
suggested and I guess the declaratives are not executed as you said -
here is the output
I have a program that uses the Report Writer module. The program works and writes the expected output. However, the DECLARATIVES don't seam to get executed. I mean the DISPLAY does not show and the value of the WS-X field in the detail is never set to "*" as specified in the Declaratives.
Is the code in the DECLARTIVES executed before printing detail group or is it only for control breaks and IO exceptions?
This all is a part of my learning. Thanks for helping.
I am using GNU COBOL 3.1.2.0 on Windows 10.
Last edit: Emmad 2021-07-01
Assuming you are using GC 3.1.2 or there abouts try adding after the
displays a
STOP "Check vdu O/P".
Now see if that appears - it is possible that the screen has cleared
after EOR.
Last edit: Vincent (Bryan) Coen 2021-07-03
Thank you for your help. I tried adding:
STOP "Check vdu O/P".
But It still does not display. If I use display outside DECLARTIVES, the display result show.
Thank you for your help. I tried adding:
STOP "Check vdu O/P".
But It still does not display. If I use display outside DECLARTIVES, the display result show.
Please confirm what version of the compiler you are using BUT it would appear that the declarative is NOT being executed.
It might be worth while to retest having turned on tracing and debug by running :
cobc -x progname.cbl -d -g -ftraceall
Then :
export COB_SET_TRACE=YES
export COB_TRACE_FILE=/home/{username}/trace.log
now run the program and after look in the file trace.log and see if the declarative has run having checked that you have a valid report file.
Thank you for the idea and the detailed description.
I am using GNU COBOL 3.1.2.0 on Windows 10.
I did what you suggested and I guess the declaratives are not executed as you said - here is the output
Last edit: Emmad 2021-07-04
Agreed it is not being executed.
Suggest you report it as a Bug via the Bug tracker but make sure you
specify the exact version of the compiler and platform you are using.
On 03/07/2021 22:09, Emmad wrote:
Will do - Thank you.