Portal | Manuals | References | Downloads | Info | Programs | JCLs | Master the Mainframes
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Usergroups Profile Log in to check your private messages Log in
 

 

OPTIMIZE(FULL) documentation

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> COBOL Programming
View previous topic :: :: View next topic  
Author Message
Bill Woodger

DFSORT Moderator


Joined: 09 Mar 2011
Posts: 7255

PostPosted: Mon Apr 11, 2011 7:49 pm    Post subject: OPTIMIZE(FULL) documentation
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: 7936
Location: Bellevue, IA

PostPosted: Mon Apr 11, 2011 8:10 pm    Post subject:
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    Post subject:
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

DFSORT Moderator


Joined: 09 Mar 2011
Posts: 7255

PostPosted: Mon Apr 11, 2011 8:37 pm    Post subject:
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    IBMMAINFRAMES.com Support Forums -> COBOL Programming All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
This topic is locked: you cannot edit posts or make replies. Full Time COBOL Software Development ... shally Mainframe Jobs 0 Fri Jan 20, 2017 5:24 am
No new posts Can we use OPTIMIZE FOR 1 ROWS for fe... cvijay784 DB2 1 Fri Aug 05, 2016 11:56 am
No new posts Append to file, but also remove old r... Garry Carroll JCL & VSAM 3 Mon Jan 25, 2016 8:05 pm
No new posts Full time job & hobbies/second jo... vasanthz General Talk & Fun Stuff 5 Wed Feb 18, 2015 10:06 pm
No new posts DFSMSdss full volume backups JCL when... Alan Playford IBM Tools 3 Thu Feb 05, 2015 4:50 pm


Facebook
Back to Top
 
Mainframe Wiki | Forum Rules | Bookmarks | Subscriptions | FAQ | Tutorials | Contact Us