On Thu, 23 Jul 2015 08:47:50 -0500, John McKown wrote:

>On Thu, Jul 23, 2015 at 8:36 AM, David Evans wrote:
>
>> I am probably over simplifying the issue or I am sure the smart folks at
>> IBM would have done this already but it seems to be that if the DSN ENQ
>> included a VOLSER, then the system would be able to distinguish between a
>> truly ENQ Dataset and one that has the same name of an ENQ Dataset that
>> resides on another volume.  If the file is really in use, I would want to
>> have the protection of jumping through hoops to make sure this is done by
>> someone who truly understands what they are doing and its possible impact.
>>
>
>​I had thought the same thing. But, first, what volser would be in the ENQ
>name? The first problem is that, for JCL at least, the ENQ for a DSN
>referenced in the JCL is done by the initiator at job start time, before
>the first step starts. So any DISP=NEW data sets don't have a volume yet.
>And they won't until, and unless, the creating step is initiated. So
>there's a problem just to start with. There there is the question of "which
>volser in the ENQ"? For existing DSNs, should it be just the first of a
>multi-volume DSN (but what if somebody does a VOL=SER=...... for the 2nd
>volume of a 3 volume set?), or every volume in a multi-volume. What about
>when the DSN extends to a new volume? I guess that would require another
>ENQ to be issued. So we need to be sure the system can do so at the proper
>time. And what to do if the ENQ fails at that point? Select another volume?
>Wait? Abend?​ There are likely more impediments that I just can't think of
>at present.
> 
Much of this could be done, and should have been done.  IBM was short
sighted; perhaps resource constrained.

At the time any volser becomes known, issue an ENQ SHR for each volser+dsn
combination.  I believe that an integrity threat occurs only when scratching an
extent; at that point, upgrade the ENQ to EXC; if that fails, ABEND -- the user
should have requested EXC in the first place.

There's no good place to issue those ENQs.  An IBM employee has mentioned
code that does low-level I/O to DASD, never issuing OPEN but relying on the
DSN ENQ EXC to preserve integrity.

It's possible to allocate a new data set without ever acquiring an ENQ EXC DSN.

-- gil

----------------------------------------------------------------------
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to [email protected] with the message: INFO IBM-MAIN

Reply via email to