On Fri, 25 May 2007 14:14:44 -0400, Bruce Black wrote:
>
>As far as a EXC-SHR function, this also seems obvious to me.  The
>initiator ENQs the dataset, and then releases the dataset at the end ofVVe
>the last step that uses it.  If you issue a EXC-SHR request, a fullowing
>step may need the dataset exclusive and you have now compromised the
>dataset.  There is no easy way that I know to determine if the current
>step is the last step that uses the dataset.
>
Apparently the initiator is up to the task, easy or difficult.
The JCL fragment:

    //*
    //STEP1    EXEC  PGM=IKJEFT01
    //SYSUT1    DD   DISP=OLD,DSN=FOO.BAR,
    //  UNIT=SYSALLDA,VOL=SER=TSO001
    //SYSTSPRT  DD   SYSOUT=(,)
    //SYSTSIN   DD   *
        free dd(sysut1)
        free dd(sysut1)
    //*
    //STEP2    EXEC  PGM=IKJEFT01
    //SYSUT1    DD   DISP=OLD,DSN=FOO.BAR,
    //  UNIT=SYSALLDA,VOL=SER=TSO001
    //SYSTSPRT  DD   SYSOUT=(,)
    //SYSTSIN   DD   *
        free dd(sysut1)
        free dd(sysut1)
    //*

produces SYSTSPRT from STEP1

    READY
        free dd(sysut1)
    READY
        free dd(sysut1)
    IKJ56247I FILE SYSUT1 NOT FREED, IS NOT ALLOCATED
    READY
    END

... and  SYSTSPRT from STEP2

    READY
        free dd(sysut1)
    READY
        free dd(sysut1)
    IKJ56247I FILE SYSUT1 NOT FREED, IS NOT ALLOCATED
    READY
    END

... so even though FOO.BAR was FREEd in STEP1, the initiator
was able to allocate it again in STEP2.  I hope this was
not done without an ENQ.  Whatever technique the initiator
used here, it could use the same technique to differentiate
an EXC from A SHR ENQ.

-- gil

----------------------------------------------------------------------
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to [EMAIL PROTECTED] with the message: GET IBM-MAIN INFO
Search the archives at http://bama.ua.edu/archives/ibm-main.html

Reply via email to