On Thu, 19 Nov 2015 14:52:33 +0000, Leonard.John.J wrote: >We are trying to understand the ramifications of this change to >the GETMAIN and I was wondering if anyone else has dealt with this. >I have this document that says > >“References to GETMAIN also apply to STORAGE OBTAIN. > >The description and behavior of the GETMAIN macro as documented >in the z/OS MVS Assembler Services Reference remain unchanged >by this APAR. With respect to whether or not the system zeroes >the newly getmained storage, the guidelines remain as follows: > >When you obtain storage, the system clears the requested storage >to zeros if you obtain either: > o 8192 bytes or more from a pageable, private storage subpool. > o 4096 bytes or more from a pageable, private storage subpool, > with BNDRY=PAGE specified > >In all other cases you must NOT assume that the storage is >cleared to zeros, unless indicated by the return code when >CHECKZERO=YES is specified.” > >The way I read this is getmained storage may not be initialized in all cases.
That is correct, but it is very old behavior. Long ago, the storage that you obtain was never initialized by GETMAIN. By MVS/ESA V4, the documentation was changed to include the above text. The change was introduced sometime between 1987 and 1993. APAR OA27291 describes the change in GETMAIN that was introduced in z/OS 2.1. It results in better performance of GETMAIN. A side effect is that is that there is somewhat more chance that a request will be satisfied from a location that had been previously obtained and then freed. If that request is less than 8K (or 4K with BNDRY=PAGE), it will not be zeroed and there might be residual data in that storage. There is a DIAG option, USEZOSV1R9RULES, to tell VSM whether or not to use the new algorithms. The default is still YES, "to provide a seamless migration", even in z/OS 2.2. >Even if I figure out what to do with every GETMAIN what do I do >about vendor code I don’t have the source so I can’t tell if the >code assumes the storage is initialized or not Contact the vendors. -- Tom Marchant
