gnucobol-users
[Top][All Lists]
Advanced

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

Re: [open-cobol-list] OC issues (more)


From: Sergey Kashyrin
Subject: Re: [open-cobol-list] OC issues (more)
Date: Wed Jan 18 09:24:08 2006

Alain,

Only O-C detect the error and I'M VERY HAPPY OF THAT !

You are not correct. Other compilers are detecting error if you USE this 
duplicate paragraph name (perform thru).
Otherwise it's a warning (AS400) or even nothing (Microfocus)

if you use vim you can safely edit this program ant type "g/EXIT/d"

The goal is not to correct a Cobol program !!!
The goal is to make OC deal with such dumb issues to be more compatible with 
other major compilers.

What strange/funny cobol programmer has write something like that ?

I don't know but I expect it to be the result of copy/paste

Regards,
Sergey

----- Original Message ----- From: "Alain Lucari" <address@hidden>
To: <address@hidden>
Sent: Wednesday, January 18, 2006 12:23 PM
Subject: Re: [open-cobol-list] OC issues (more)


Hi,

Le Tue, 17 Jan 2006 13:18:50 -0500
"Sergey Kashyrin" <address@hidden> a écrit:

Hi again.
All of that is about compatibility with MAJOR compilers (390,
AS/400, MF, FJ) in a situations when program is incorrect.

       IDENTIFICATION DIVISION.
       PROGRAM-ID. ztest INITIAL.
       ENVIRONMENT DIVISION.
       DATA DIVISION.
       WORKING-STORAGE SECTION.
       PROCEDURE DIVISION.
           PERFORM 01-SUB.
           PERFORM 02-SUB.
           GOBACK.
       01-SUB.
           DISPLAY "TEST1 OK".
       01-EXIT.
           EXIT.
       02-SUB.
           DISPLAY "TEST2 OK".
       01-EXIT.
           EXIT.

OC gives an ERROR and not producing the code:
ztest2.cbl: In paragraph '02-SUB':
ztest2.cbl:16: Error: redefinition of '01-EXIT'
ztest2.cbl:12: Error: '01-EXIT' previously defined here

All other Cobols are accepting

 are you SURE of that ?
I'm (helas !) a very old cobolist and for ME
- if you write "perform 01-sub" without "thru 01-exit"
 the "01-EXIT" paragraph as no effect and you may safely suppress it
 (unless you sold yours cobols programs with a price per line ;-))
- it is an error to have two (or more) paragraph or two (or more)
 data-names with the SAME name.
it is true that MF or ACU said nothing about that but they do with ??
Only O-C detect the error and I'M VERY HAPPY OF THAT !
if you use vim you can safely edit this program ant type
"g/EXIT/d"
wq

What strange/funny cobol programmer has write something like that ?
try it with JAVA

regards,
--
Alain Lucari (Eurlix)


-------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc. Do you grep through log files
for problems?  Stop!  Download the new AJAX search engine that makes
searching your log files as easy as surfing the  web.  DOWNLOAD SPLUNK!
http://sel.as-us.falkag.net/sel?cmd_______________________________________________
open-cobol-list mailing list
address@hidden
https://lists.sourceforge.net/lists/listinfo/open-cobol-list



reply via email to

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