There is this in the JCL User's Guide:
A statement requesting exclusive control overrides any number of
statements requesting shared control. One of two methods can be used
to request exclusive control:
DISP=NEW, DISP=MOD or DISP=OLD on a JCL DD statement.
DISP=NEW, DISP=MOD or DISP=OLD on a dynamic allocation request,
including dynamic allocation requests that result from the use of
certain utility control statements.
So, once you request exclusive control on a dynamic allocation request,
(including non-obvious uses of dynamic allocation done via
TSO ALLOCATE or some utility, such as IDCAMS,) you are considered
to have exclusive control.
I will add that when this exclusive control is obtained for a dynamic
allocation request, it will not be downgraded again in a later
step. It will be released when the last step that uses the data
set completes.
Steve J.
-------- Forwarded Message --------
Subject: Re: Downgrading ENQ
Date: 3 Jul 2015 12:08:29 -0700
From: Paul Gilmartin <[email protected]>
Reply-To: IBM Mainframe Discussion List <[email protected]>
Organization: None
Newsgroups: bit.listserv.ibm-main
On Fri, 3 Jul 2015 11:07:31 -0500, Scott Fagen wrote:
On Thu, 2 Jul 2015 09:31:37 -0500, Paul Gilmartin wrote:
Suppose:
ALLOCATE DD(DDSHR) DSN(FOO.BAR) SHR
There is now an ENQ SHR SYSDSN FOO.BAR
Then:
ALLOCATE DD(DDEXC) DSN(FOO.BAR) OLD
The ENQ is upgraded to EXC
... some stuff ... Then:
FREE DD(DDEXC)
is the ENQ downgraded back to SHR? Why or why not?
-- gil
See
http://www-01.ibm.com/support/knowledgecenter/SSLTBW_2.1.0/com.ibm.zos.v2r1.e0za100/mvssysdsn.htm
Which says much about JCL, but nothing about dynamic allocation which
was the subject of my quetion and example.
-- gil
----------------------------------------------------------------------
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to [email protected] with the message: INFO IBM-MAIN
----------------------------------------------------------------------
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to [email protected] with the message: INFO IBM-MAIN