z/OS 2.1 added the new DSENQSHR function which allows downgrade of ENQ from exclusive to share. It must be specified on the job, default is not to downgrade (which was the behaviour prior to 2.1). Makes for potential confusion in application behaviour if not used with care.
On Tue, Oct 12, 2021 at 10:26 AM Charles Mills <[email protected]> wrote: > I don't know, but what about if you had > > //DD1 DD DISP=SHR,DSN=SOME.DATA.SET > //DD2 DD DISP=OLD,DSN=SOME.DATA.SET,FREE=CLOSE > > And CLOSEd DD2? > > FWIW, I just looked up FREE=CLOSE to make sure I had it right and my > at-hand manual (V2R1) says "Use the FREE parameter to specify when the > system is to unallocate the resources used for this DD statement’s data > set. The resources can be devices, volumes, or exclusive use of a data set. > > Note: Specifying FREE will not release the enqueue on the data set until > the last step that requires the data set completes processing." > > Not certain but that would seem to imply an ENQ downgrade. > > Charles > > > -----Original Message----- > From: IBM Mainframe Discussion List [mailto:[email protected]] On > Behalf Of Paul Gilmartin > Sent: Monday, October 11, 2021 3:35 PM > To: [email protected] > Subject: DYNALLOC, FREE, and ENQ? > > Suppose I have in JCL: DD DISP=SHR,DSN=SOME.DATA.SET. > > In my program, I dynalloc (same) SOME.DATA.SET OLD. I expect > the ENQ to be upgraded to EXC. But when I FREE the allocation, > can the ENQ revert to SHR? > > -- 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 > ---------------------------------------------------------------------- For IBM-MAIN subscribe / signoff / archive access instructions, send email to [email protected] with the message: INFO IBM-MAIN
