Hmm, I took your example job and added a step inbetween your two and put
the job to sleep for 30 seconds.  

The SYSTSPRT output looked like this:

READY                 
    FREE DD(SYSUT1)   
READY                                                         
    FREE DD(SYSUT1)                                           
IKJ56247I FILE SYSUT1 NOT FREED, IS NOT ALLOCATED             
READY                                                         
END                                                           
Going to sleep for 30 seconds                                 
14:05:52.270727                                               
14:06:22.280007                                               
READY                                                         
END                                                           
READY                                                         
    FREE DD(SYSUT1)                                           
READY                                                         
    FREE DD(SYSUT1)                                           
IKJ56247I FILE SYSUT1 NOT FREED, IS NOT ALLOCATED             
READY                                                         
END                                                           

But for that 30 seconds, I was unable to edit the SYSUT1 data set -
"Data set in use".   The ISPF Data Set Contention panel showed my batch
job "owns data set exclusively."

Greg Shirey
Ben E. Keith Company


-----Original Message-----
From: IBM Mainframe Discussion List On Behalf Of Paul Gilmartin
Sent: Friday, May 25, 2007 1:49 PM
To: IBM-MAIN@BAMA.UA.EDU
Subject: Re: Why is there JOB scope for DSN ENQ's anyway?


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.

----------------------------------------------------------------------
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