-----Original Message----- From: IBM Mainframe Discussion List [mailto:[email protected]] On Behalf Of Skip Robinson Sent: Thursday, November 15, 2012 5:57 PM To: [email protected] Subject: Re: "New" way to do UCB lookups >... I'm curious about the purported risk of a 'moving device'. In order to >make a significant change to a device--especially UCB address--the volume has >to be offline or else the dynamic ACTIVATE fails.
There is a way, and it's not very difficult, of doing I/O to an offline device. The device has to have been varied offline but not yet have all of its channel paths varied offline. If there is at least one connected path remaining to a device, then authorized code can do I/O to it. Code like this probably should serialize on the appropriate resource before doing its I/O to an offline device. At least the UCB should be PINned before trying to do the I/O. However, some programmers seem to think that the probability of having the last path varied out from under an I/O request is so remote that the need to serialize is ignored in order to get the code working faster. I am not one who thinks so, as I have seen it happen to my code. Yes, there is some "overhead" in PINning the UCB. There is also a huge headache waiting to happen if the UCB is not serialized by PINning and then the UCB is somehow changed, the device has its last online path varied offline, or the UCB is deleted, meaning its storage is FREEMAINed and possibly reused instantly by some other process needing a small piece of virtual storage. Sometimes this headache has caused a reIPL of a system. How much overhead does a reIPL cost the entire data center in order to save a fraction of a millisecond in order to serialize properly because the reIPL will probably not have to happen? Write the PIN and UNPIN code once, get it debugged, then encapsulate it in a simple macro so you don't have to look it up in the book each time you want to use it again. Bill Fairchild Programmer Rocket Software 408 Chamberlain Park Lane * Franklin, TN 37069-2526 * USA t: +1.617.614.4503 * e: [email protected] * w: www.rocketsoftware.com ---------------------------------------------------------------------- For IBM-MAIN subscribe / signoff / archive access instructions, send email to [email protected] with the message: INFO IBM-MAIN
