IBM Mainframe Forum Index
 
Log In
 
IBM Mainframe Forum Index Mainframe: Search IBM Mainframe Forum: FAQ Register
 

OPTIMIZE(FULL) documentation


IBM Mainframe Forums -> COBOL Programming
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
Bill Woodger

Moderator Emeritus


Joined: 09 Mar 2011
Posts: 7309
Location: Inside the Matrix

PostPosted: Mon Apr 11, 2011 7:49 pm
Reply with quote

There has been a discussion in the CLIST & rexx forum which has swerved into a discussion of the documentation of OPTIMIZE(FULL) in the Enterprise Cobol Programmers Guide.

Maybe time to move it into here, I thought.

This is from the Enterprise COBOL for z/OS Programming Guide Version 4 Release 2 SC23-8529-01 manual:
Quote:

The FULL suboption requests that, in addition to the optimizations performed with OPT(STD), the compiler discard unreferenced data items from the DATA DIVISION and suppress generation of code to initialize these data items to the values in their VALUE clauses. When OPT(FULL) is in effect, all unreferenced level-77 items and elementary level-01 items are discarded. In addition, level-01 group items are discarded if none of their subordinate items are referenced. The deleted items are shown in the listing. If the MAP option is in effect, a BL number of XXXXX in the data map information indicates that the data item was discarded.


The part which is causing me to treat this as a documentation error is:

"In addition, level-01 group items are discarded if none of their subordinate items are referenced."

So, Robert Sample kindly ran a little test program with a group 01-level with one lower level elementary item. The group 01-level was then redefined, again containing a lower level elementary item. That second elementary item was referenced in the procedure division.

OPT(FULL) did not delete the unreferenced (except by the redefines) level-01 group item. Correctly, but not as documented (I argue).

So, is it a documentation error (as I argue) or not? It seems pretty clear to me from the above, but I'm having trouble convincing anyone :-)
Back to top
View user's profile Send private message
Robert Sample

Global Moderator


Joined: 06 Jun 2008
Posts: 8696
Location: Dubuque, Iowa, USA

PostPosted: Mon Apr 11, 2011 8:10 pm
Reply with quote

I don't think IBM is clear on what "reference" means. If it means any subordinate item or redefined subordinate item then the dcoumentation as quoted is correct -- but they need to add clarification as to what "reference" refers to; if it doesn't mean any subordinate item or redefined subordinate item then the documentation quoted needs revision.
Back to top
View user's profile Send private message
Ronald Burr

Active User


Joined: 22 Oct 2009
Posts: 293
Location: U.S.A.

PostPosted: Mon Apr 11, 2011 8:16 pm
Reply with quote

The Enterprise COBOL for z/OS Language Reference - Version 4 Release 2 (SC23-8528-01) says:

"When an area is redefined, all descriptions of the area are always in effect; that is, redefinition does not supersede a previous description."

Hence, any item (either group or elementary) subordinate to a REDEFINED item, is implicitly subordinate to the item being redefined.

As far as I am concerned, that makes the documentation in the Programming Guide correct, as written.
Back to top
View user's profile Send private message
Bill Woodger

Moderator Emeritus


Joined: 09 Mar 2011
Posts: 7309
Location: Inside the Matrix

PostPosted: Mon Apr 11, 2011 8:37 pm
Reply with quote

Yet, same manual

Quote:

You can code the CORRESPONDING phrase in a MOVE statement to move subordinate elementary items from one group item to the identically named corresponding subordinate elementary items in another group item:


This will not move any subordinate items that happen to be the object of a redefines. I can take every reference to subordinate items (group or elementary) from the manuals to make the same point. Everywhere else in the manuals, it does not mean "just stick in the redefines item if you feel like it".

As I have said, I agree with you that there is a logical relationship between redefines subject and object. What I'm saying is that nowhere else in the manual does "subordinate item" of any sort include an "implicit" subordinate item from a redefines. I dont' see why, suddenly, OPT(FULL) should be read in that way, even though it behaves in that way.

The quote you posted in the other forum earlier, is exactly the sort of thing I think you were referring to about reading IBM manuals. What it said was correct, but if you want to see exactly what it does, you have to try it out yourself.

All my adult life a "subordinate data item" has, as far as I'm concerned, been all the things that make up the 01-level. I have never seen anything in a Cobol manual to make me even think about questioing this. So, when I read the original quote my first thought was "they can't mean that". Maybe in these days of things being "relative", it is all OK in the end? "subordinate data item" can mean what we feel it should mean at the time, one thing for CORRESPONDING, one thing for OPT(FULL), something else for, I don't know, everyone chose their favourite? :-)

As to Robert's point, I don't like the idea of mucking around with what "reference" means any more than "subordinate data item" :-) And you're saying they should change the docs for reference, if that is what they mean, else they should change the docs.

Anyway, my penn'oth.
Back to top
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   Reply to topic View Bookmarks
All times are GMT + 6 Hours
Forum Index -> COBOL Programming

 


Similar Topics
Topic Forum Replies
No new posts VB to VB copy - Full length reached SYNCSORT 8
No new posts Products/Tools to Optimize Adabas Dat... Compuware & Other Tools 2
No new posts Reference documentation DFSDDLT0 IMS DB/DC 2
No new posts RXSUBCOM Return Codes / Documentation CLIST & REXX 6
This topic is locked: you cannot edit posts or make replies. Internal Autonomous Stored Procedure ... DB2 6
Search our Forums:

Back to Top