Redefines clause in occurs clause

Support for OS/VS COBOL, VS COBOL II, COBOL for OS/390 & VM and Enterprise COBOL for z/OS

Re: Redefines clause in occurs clause

Postby Deepak kumar25 » Sat Apr 21, 2012 6:47 pm

this is the updation of compiler, which gives us such diagnostic messages
Deepak kumar25
Posts: 34
Joined: Mon Jan 10, 2011 10:51 am
Has thanked: 0 time
Been thanked: 0 time

Re: Redefines clause in occurs clause

Postby Robert Sample » Sat Apr 21, 2012 6:58 pm

k i will tell, it due to new compiler v3r4 which allows the warning level diagnostic.
First, your "new compiler" was announced by IBM on June 21, 2005 -- so it is nearly 7 years old at this point. The current Enterprise COBOL compiler is V4R2 IIRC.

Second, the compiler diagnostics reflect the vendor's understanding and implementation of the COBOL international standard as published by the international standards committee. There's been warning level messages in COBOL ever since I started using it in 1975 (and they were present before then as well).

Third, I don't believe those diagnostic messages are new to V3R4 -- I recall seeing them (or similarly worded ones) long before Enterprise COBOL V3R4 came along. They may be new to YOU, but they've been around for a long time.
Robert Sample
Global moderator
Posts: 3686
Joined: Sat Dec 19, 2009 8:32 pm
Location: Dubuque, Iowa, USA
Has thanked: 1 time
Been thanked: 274 times

Re: Redefines clause in occurs clause

Postby BillyBoyo » Sat Apr 21, 2012 7:06 pm

Deepak kumar25 wrote:this is the updation of compiler, which gives us such diagnostic messages

What compiler were you using before?

In "old speak" redefining with more storage that the redefined item had was an "E"rror.

As far as I know, no IBM Cobol has allowed this situation without producing a diagnostic message of some type.

If you are saying this "used" to work without a diagnostic, in an IBM Cobol, tell us what your old compiler was and show us, if possible a compiled listing or at least the compiler options.
Global moderator
Posts: 3804
Joined: Tue Jan 25, 2011 12:02 am
Has thanked: 22 times
Been thanked: 265 times

Re: Redefines clause in occurs clause

Postby dick scherrer » Sat Apr 21, 2012 11:18 pm


but we cannot redefine a data item having occurs clause.
I suspect that ratner than "point of view" you might mean "it is my understanding".

When teaching, one must be careful NOT to say anything to do with what happens on the computer in terms of one's opinion or point of view. It is best for a teacher not to mention their "understanding". What they "believe" has nothing to do with technical information. The teacher should only present what actually does happen (and be able to answer questions factually when asked how/why "something" does happen). There is no penalty for answering a question with "I don't have the answer for "that", but i will find the answer". Of course, this cannot be the answer to too many questions - that would cause a penalty ;)

I'm a firm believer that the teacher should have several years of actual experience (before attempting to teach a class) because otherwise, they really don't know the subject and give as much bad information as good and then some employer gets someone (the mistrained student) far less qualified than they should be. We see much of this on the forum.

Another thought. . . As most technical material is written in English (and many/most classes are presented in English) teachers should make a large (amount of time) investment becoming fluent in English. It is Critical that technical information be presented exactly corret - not just "close".
Hope this helps,
User avatar
dick scherrer
Global moderator
Posts: 6269
Joined: Sat Jun 09, 2007 8:58 am
Has thanked: 3 times
Been thanked: 93 times


Return to IBM Cobol


  • Related topics
    Last post