Recently, a question was posed by a user trying to close a file in CICS using CEMT and subsequently seeing it as still allocated to the CICS region by MVS. The reply indicated that the file might be still allocated because it was the target of a DD statement in the CICS region's JCL.
This might not be the case, however. Even if the file is not mentioned in the region's JCL, this can happen. We have had the same issue when there is a task that has used the file in any way and that task is still running. It doesn't matter if the task has syncpointed nor even if that task is the one that requested the close. CICS will not relinquish the file until *all* tasks that have touched that file have terminated.
If the issue is really that the file is in the region's JCL, there are two solutions:
1. Remove it from the JCL and ensure that the DSN is in the FCT entry, or
2. Use a third-party product that can deallocate the file.
Yes, as a continuation to the relevant comment but you will not be able to discard the resource if anything is actually using the file. This is standard CICS function. This issue occurs as to how to get rid of the MVS JFCT entry associated with the Job Step TCB.
If the DSN is in the RDO FILE entry, then a DISCARD of it will cause the file to be deallocated and so disappear from the JFCT.
If the file is in the JCL, then nothing is going to get rid of it from the JFCT UNLESS some external action is taken as you suggest using some sort of vendor product. But, if this is done the problem remains about getting it back to the CICS region for subsequent use. I'd rather not go down this route!
CICS Technical Strategist -- CICS expert at Search390.com
Editor's note: Do you agree with this expert's response? If you have more to share, post it in one of our .VO7aaqqaAFk.0@/search390>discussion forums.
Dig Deeper on IBM system z and mainframe systems
Related Q&A from Robert Crawford
For better mainframe capacity planning, how do I convert CPU hours to MIPS? And is there a way to calculate the relationship between MIPS and MSUs? Continue Reading
I have two years of experience in mainframe technology, currently working as a mainframe developer. I want to change to Java technology. Continue Reading
I want to replicate DB2 from the mainframe to an AIX box since it's cheaper and the copy can be used for testing. Is this possible? Continue Reading
Have a question for an expert?
Please add a title for your question
Get answers from a TechTarget expert on whatever's puzzling you.