If your application didn't want any storage, why did it waste the system service's time by asking for none?
Vacation Notice: None currently scheduled Tom Puddicombe Principal Systems Engineer Mainframe Performance & Capacity Planning CSC 31 Brookdale Rd, Meriden, CT 06450 ITIS | (860) 428-3252 | tpudd...@csc.com | www.csc.com This is a PRIVATE message. If you are not the intended recipient, please delete without copying and kindly advise us by e-mail of the mistake in delivery. NOTE: Regardless of content, this e-mail shall not operate to bind CSC to any order or other contract unless pursuant to explicit written agreement or government initiative expressly permitting the use of e-mail for such purpose. From: DASDBILL2 <dasdbi...@comcast.net> To: IBM-MAIN@LISTSERV.UA.EDU Date: 02/13/2014 06:50 AM Subject: Re: Storage Obtain ..... Sent by: IBM Mainframe Discussion List <IBM-MAIN@LISTSERV.UA.EDU> In a theoretical computer science class, one could debate the validity of requesting 0 bytes of storage or of "successfully" acquiring 0 bytes of storage. In the real world, such an event should be an error, but this quirk is not going to be changed by IBM because of incompatibility issues. So either insert code after a STORAGE OBTAIN to test for return code = 0 and also storage address = 0 and then ABEND your own code (or do something else other than try to use the non-existent storage that you didn't really get), or else test for requested length = 0 before you do the STORAGE ABEND and then do not do the STORAGE OBTAIN and assume you have new storage to use. Translation: add some workaround code into your program since IBM will not "fix" it. Suggestion to IBM: Add a sentence to the doc warning users about this odd behavior. Bill Fairchild ----- Original Message ----- From: "Gerhard Postpischil" <gerha...@charter.net> To: IBM-MAIN@LISTSERV.UA.EDU Sent: Wednesday, February 12, 2014 5:22:38 PM Subject: Re: Storage Obtain ..... On 2/12/2014 6:06 PM, Tony Harminc wrote: > I object far more to returning an address of 0 than to accepting a > length of 0 on the request. To be sure, you are allowed to store no > more than 0 bytes in your obtained area, so the 0 address sounds > reasonable, but some instructions are allowed by the architecture to > recognize access exceptions in the case where no data is stored, e.g. > STCM with a zero mask. The way I get and free storage, I'd be happier with an abend (R form) or non-zero return code. I generally save the length, and then do a FREEMAIN (or STORAGE RELEASE) using the saved length. If the GETMAIN/OBTAIN was accepted, freeing zero length is an instant disaster. ---------------------------------------------------------------------- For IBM-MAIN subscribe / signoff / archive access instructions, send email to lists...@listserv.ua.edu with the message: INFO IBM-MAIN ---------------------------------------------------------------------- For IBM-MAIN subscribe / signoff / archive access instructions, send email to lists...@listserv.ua.edu with the message: INFO IBM-MAIN