On Wed, 12 Aug 2015 10:36:45 -0600, Paul Gilmartin wrote:

>On 2015-08-12, at 08:07, Kurt Quackenbush wrote:
>
>> On 8/12/2015 4:14 AM, Beesley, Paul wrote:
>>> GIMUNZIP checks whether the dataset already exists. If it does, it
>>> reuses it. If not, it creates it.
>>
>> Yup, what he said.
>>
>Hmmm...  Not so fast!  I get the message when I specify replace="NO".
>In that case, it's just silly to check by attempting to allocate OLD.
>
On further review; attempting to give the design more credit than it deserves;
I wondered: Suppose it checks all the data sets up front and immediately
exits; RC=12 if any can't be replaced; without creating the others.

(For extra credit, the student is invited to describe the timing windows in 
this scheme.)

Inspection of the timestamps in JESMSGLG and SYSPRINT shows this is not
the case; they interleave.  In fact, if I delete all the target data sets except
one, GIMUNZIP creates all the others and fails, RC=12, on the last one.

And if another job has an ENQ on a target DSN, it fails not with IKJ56228I in
JESMSGLG but with "IKJ56225I DATA SET ... ALREADY IN USE, ..." in SMPOUT.

Envisioned refinement:

1. Issue ENQ EXC SYSDSN for every target DSN.  Leave ENQs in effect.
   Fail as appropriate.

2. Verify nonexistence of every data set with replace="NO".  Fail as
   appropriate.

3. If all is well, extract.

...  (The poor man's approximation to LUW)  But is it worth it?

-- gil

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

Reply via email to