Page 2 of 2

Re: Redefines clause in occurs clause

PostPosted: Sat Apr 21, 2012 6:47 pm
by Deepak kumar25
this is the updation of compiler, which gives us such diagnostic messages

Re: Redefines clause in occurs clause

PostPosted: Sat Apr 21, 2012 6:58 pm
by Robert Sample
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.

Re: Redefines clause in occurs clause

PostPosted: Sat Apr 21, 2012 7:06 pm
by BillyBoyo
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.

Re: Redefines clause in occurs clause

PostPosted: Sat Apr 21, 2012 11:18 pm
by dick scherrer
Hello,

IN MY POINT OF VIEW:
WE CAN REDEFINE A DATA ITEM HAVE AN OCCURs CLAUSE.
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".