Steve, Just a side question, not related to the original thread -- How do you teach COBOL programmers when (or even if) to use INITIALIZE? I ask because I have found that the code generated by INITIALIZE is extraordinarily inefficient. I have often just removed it from anyplace that is in any kind of loop and also from any frequently called common subroutines and managed to achieve quite a bit of CPU savings as a result.
I found that MOVE SPACES (or LOW-VALUES, your choice) to 01-level-structure-name and then if/as needed separately initializing numeric fields that will be referenced was far more efficient than initializing an entire heterogeneous structure. Of course, doing an INITIALIZE only once in a run unit won't hurt performance in the least, and might save trouble later, so I do not say never to INITIALIZE. I just say never in loops or subroutines that get called many times (FSVO "many"). For large-index-value but relatively simple element type tables there is also the (relatively) new ability to specify VALUE clauses for table elements. I've not investigated the efficiency of using this new feature. Just curious about your thoughts and teaching on this. Peter -----Original Message----- From: IBM Mainframe Discussion List [mailto:IBM-MAIN@LISTSERV.UA.EDU] On Behalf Of Steve Comstock Sent: Tuesday, July 30, 2013 3:57 PM To: IBM-MAIN@LISTSERV.UA.EDU Subject: Re: COBOL ? - emulating recursive PERFORM statement <Snipped> Also, the easy stuff gets adopted early and more widely: scope terminators evaluate larger tables initialize LE storage management LE dates but not so much LE condition handling etc. -- This message and any attachments are intended only for the use of the addressee and may contain information that is privileged and confidential. If the reader of the message is not the intended recipient or an authorized representative of the intended recipient, you are hereby notified that any dissemination of this communication is strictly prohibited. If you have received this communication in error, please notify us immediately by e-mail and delete the message and any attachments from your system. ---------------------------------------------------------------------- For IBM-MAIN subscribe / signoff / archive access instructions, send email to lists...@listserv.ua.edu with the message: INFO IBM-MAIN