bug-gnucobol
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[open-cobol-list] Bug Report


From: Robert Sherry
Subject: [open-cobol-list] Bug Report
Date: Wed Oct 26 20:28:07 2005

 

    Please consider the following COBOL program:

 

       IDENTIFICATION DIVISION.                    

       PROGRAM-ID.    F1.

       ENVIRONMENT DIVISION.                               

       CONFIGURATION SECTION.                           

        SOURCE-COMPUTER.    IBM-370.

       INPUT-OUTPUT SECTION.                              

       FILE-CONTROL.                                     

           SELECT RFRIN ASSIGN TO UT-RFRIN.           

       DATA DIVISION.                                     

       FILE SECTION.                                        

       FD  RFRIN                                            

           RECORD IS VARYING IN SIZE FROM 1 TO 230         

           CHARACTERS DEPENDING ON WS-RFRIN-REC-SIZE.

       01  FD-RFRIN-REC-GRP.                                       

           05  FD-RFRIN-BYTES          PIC X(01) OCCURS 1 TO 230 

                                       DEPENDING ON WS-RFRIN-REC-SIZE.

       WORKING-STORAGE SECTION.                                     

       01  WS-RFRIN-REC-SIZE           PIC 9(9)    COMP EXTERNAL.

       PROCEDURE DIVISION.

            GOBACK.

 

I claim that this program should compile. When run through the latest version of the open source COBOL compiler the generated c code did not compile. The command line used to compile the above program was:

            cobc -save-temps -std=mvs -c c9.cob

Therefore, I have concluded that this is a bug in the Open Source COBOL compiler. I am working on a fix which I am planning to post to the group. The problem maybe in the routine output_file_definition.

 

Bob Sherry


reply via email to

[Prev in Thread] Current Thread [Next in Thread]