gnucobol-users
[Top][All Lists]
Advanced

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

[open-cobol-list] Compiler modifications


From: Michel Gouget
Subject: [open-cobol-list] Compiler modifications
Date: Wed May 31 12:45:10 2006

Dear All,

 

I successfully did the port of an application from MF to OC. Many thanks to all who contributed this great compiler.

 

I am using: “cobc -O2 -free -std=mf -ext=dat”

 

I encountered a few glitches:

 

1) This works on MF, but creates on OC an error: “Error: PERFORM statement not terminated by END-PERFORM”

 

=============cut here=======================

       IDENTIFICATION DIVISION.

       PROGRAM-ID. PROG.

       ENVIRONMENT DIVISION.

       INPUT-OUTPUT SECTION.

       DATA DIVISION.

       WORKING-STORAGE SECTION.

         01 TOTAL  PIC 999 value 0.

         01 I PIC 99.

       PROCEDURE DIVISION.

         PERFORM VARYING I FROM 1 BY 1 UNTIL I > 10

           COMPUTE TOTAL = TOTAL + 1.

         DISPLAY 'TOTAL=' TOTAL

         STOP RUN.

=============cut here=======================

 

If  the dot at the end of the COMPUTE is removed, and END-PERFORM is added, everything works OK.

 

2) When doing a READ NEXT at EOF on an indexed file, we get an error 46 (read error) instead of an error 10 (EOF)

 

3) READ PREVIOUS is not implemented

 

4) OPEN I-O a non existing file makes ERROR 35, on MF, it creates an empty file.

 

5) “READ WITH LOCK”  creates an error, it should create only a warning

 

6) “UNLOCK” creates an error, it should create a warning

 

7) Comments on MF can have a “*” in col 1-6

 

8) Error line numbers are usually wrong by a few lines

 

 

 

I modified the 0.33 compiler to implement 2) 3) 5) 6) 7)

 

I expect to add in the future automatic lock mode using Berkeley db 4.

 

Is there a way to send back my mods so that they can be reviewed and incorporated?

 

Best regards,

 

Michel


reply via email to

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