Hello Tom, Clearly I phrased things incorrectly. I meant exactly that old compiler versions raised the warning message to the effect that the VALUE IS clause was being ignored, if the VALUE IS clause was present in the LINKAGE Section. However, this is now treated as a hard compiler error in COBOL 6.1
As I said earlier, I consider the VALUE IS clause in LINKAGE to be bad code. Maybe just bad form, but not nice in any event. So, the net impact now is that the compile fails and developers MUST correct their LINKAGE Section before continuing. This is a bump in the road compared with table overflows that previously went undetected, but with 5.1 became an issue at run time. Yes, again this was bad code. But older versions of COBOL were able to ignore some errors even when the subscript overflowed. Under the newer version of COBOL, programs would fail at execution time. My curiousity question was if there were any other know nuggets similar to this that I should get in front of. And from what I can gather from the group, there are no others. Thanks Tom, .......Cameron On Mon, Jul 24, 2017 at 3:37 PM, Tom Ross <[email protected]> wrote: > > COBOL 6.1 introduced a "feature" where VALUE clauses that are used for > > initialization are flagged as errors. > > This is not true. If an ILLEGAL VALUE clause is specified in the LINKAGE > section, it always got a WARNING in older compilers that VALUE in LINKAGE > has no effect. Now with V6, an ILLEGAL VALUE clause will get a severe > error, and a legal VALUE clause in LINKAGE will get no message at all. > > Example of illegal VALUE clause (nonumeric value for numeric item): > 77 silly PIC S9(9) BINARY VALUE 'goof'. *> Will get error in LINKAGE > in V6 > > Legal value clause: > 77 legal PIC S9(9) BINARY VALUE 1234. *> Will get no error in V6 > > > Ever since I began using COBL in the seventies, this would be treated as > > warning. > > Personally, I consider it bad form, but the compiler happily marched on. > > We have a number of COPYBOOKs that are occasionally used in LINKAGE, and > > these items have raised issues during recompiles. > > Nothing terrible, but still a bump in the development road. > > Are there any new features like this in COBOL 6.2? > > I don't think so! > > Cheers, > TomR >> COBOL is the Language of the Future! << > > ---------------------------------------------------------------------- > For IBM-MAIN subscribe / signoff / archive access instructions, > send email to [email protected] with the message: INFO IBM-MAIN > ---------------------------------------------------------------------- For IBM-MAIN subscribe / signoff / archive access instructions, send email to [email protected] with the message: INFO IBM-MAIN
