Menu ▾ ▴

#768 COBOL REPORT WRITER - SUM Clause at CONTROL FINAL produces zero

unclassified
pending
5 - default
2021-09-26
2021-09-21
Emmad
No

Hello
I have encountered the following problem when executing the code below. The issue is with the SUM clause at the FINAL control.

03 COLUMN 36 PIC $9(5).99 SUM FSM-1 FSM-2 FSM-3.

Where all referenced columns contain positive values produce zero in the output.

Also the compiler does allow for the syntax

03 COLUMN 36 PIC $9(5).99 SOURCE FSM-1 + FSM-2 + FSM-3.

OR the syntax:

03 COLUMN 36 PIC $9(5).99 SUM FSM-1 SUM FSM-2 SUM FSM-3.

Two files attached one for the code, the other is for the result.

Platform: Windows 10, CPU: 64-Bit, GNU COBOL 3.1.2

Thank you.

2 Attachments

Discussion

  • Simon Sobisch

    Simon Sobisch - 2021-09-26
    • labels: --> report writer
    • status: open --> pending
    • assigned_to: Ron Norman
     
  • Simon Sobisch

    Simon Sobisch - 2021-09-26

    @rjnorman74 Could I ask you to inspect that, too?

     

Log in to post a comment.