I had exactly the same problem decades ago and was told by my IBM SE that I needed to move the delete and define into another job and make the CICS job step (pre-EXCI) a dependant on the first job having completed . I guess things have not changed much over the past decades ( I'm not saying how many 😊 )
George -----Original Message----- From: IBM Mainframe Discussion List <IBM-MAIN@LISTSERV.UA.EDU> On Behalf Of Allan Staller Sent: 07 May 2020 14:04 To: IBM-MAIN@LISTSERV.UA.EDU Subject: Re: IDCAMS not freeing file This seems like normal behavior to me. As long as the first job is running, the enq is held. Once the job ends, the enqueue is released. As of z/OS 2.2(?) there is a "enque demotion" that will reduce the enque to shr once the need for old is removed. I am sorry I don't have time to look up the details, HTH, -----Original Message----- From: IBM Mainframe Discussion List <IBM-MAIN@LISTSERV.UA.EDU> On Behalf Of Gadi Ben-Avi Sent: Thursday, May 7, 2020 7:28 AM To: IBM-MAIN@LISTSERV.UA.EDU Subject: IDCAMS not freeing file [CAUTION: This Email is from outside the Organization. Unless you trust the sender, Don’t click links or open attachments as it may be a Phishing email, which can steal your Information and compromise your Computer.] Hi, We have the following problem I job runs IDCAMS that delete and redefines a VSAM KSDS file. The next step uses a user program to send a command to CICS to open file file. In one partition this works fine. In another partition we get: DFHFC0952 CICSTOR8 DYNAMIC ALLOCATION OF NON-RLS FILE LMFVPAPZ FAILED. RETURN CODE X'0004',X'0210' IN MODULE DFHFCFS. The manual says that this messaga is issued when the file is allocated with DISP=OLD. If we run the second step after the first job has ended, it runs OK. It looks like IDCAMS is not freeing the file after the step ends. Does anyone have an idea what can be causing this? Gadi ---------------------------------------------------------------------- For IBM-MAIN subscribe / signoff / archive access instructions, send email to lists...@listserv.ua.edu with the message: INFO IBM-MAIN ::DISCLAIMER:: ________________________________ The contents of this e-mail and any attachment(s) are confidential and intended for the named recipient(s) only. E-mail transmission is not guaranteed to be secure or error-free as information could be intercepted, corrupted, lost, destroyed, arrive late or incomplete, or may contain viruses in transmission. The e mail and its contents (with or without referred errors) shall therefore not attach any liability on the originator or HCL or its affiliates. Views or opinions, if any, presented in this email are solely those of the author and may not necessarily reflect the views or opinions of HCL or its affiliates. Any form of reproduction, dissemination, copying, disclosure, modification, distribution and / or publication of this message without the prior written consent of authorized representative of HCL is strictly prohibited. If you have received this email in error please delete it and notify the sender immediately. Before opening any email and/or attachments, please check them for viruses and other defects. ________________________________ ---------------------------------------------------------------------- For IBM-MAIN subscribe / signoff / archive access instructions, send email to lists...@listserv.ua.edu with the message: INFO IBM-MAIN ---------------------------------------------------------------------- For IBM-MAIN subscribe / signoff / archive access instructions, send email to lists...@listserv.ua.edu with the message: INFO IBM-MAIN