I have to update some records thro JCL in a vsam file, which is used by some cics region. Before updating, the file needs to be closed in the cics regions. So I need to know what are regions are accessing this file.. Any idea to find the region details..? can anyone pls help me..
Joined: 14 Jan 2008 Posts: 2504 Location: Atlanta, Georgia, USA
From an Application Programmer point of view, logon to all the regions you suspect are accessing this file, clear the screen and issue -
CEMT INQ FIL('FILENAME')
If the region has this file defined, then the response will be NORMAL. Write down this region name and then go on to the next region until there aren't anymore.
Otherwise, contact your CICS System Programmer, who can use another IBM transaction (which is not normally available to Application folks), explain what you're looking for and he/she will return a list of regions.
BTW, substitute 'FILENAME' with the actual name.
There's also a "trick" you can perform from ISPF 3.4, where you try and rename the target VSAM file, but of course, this is illegal.
With that, you'll probably get back a list of resources who have Exclusive Control. These should be your region names.
Some shops have a routine named "WHOHAS" or "WHOUSE", which you type next to the VSAM file name from ISPF 3.4.
We have n number of cics regions and also we don't kmow the all region list.. so i am not sure using 'CEMT I FI(FILENAME)'.. Since i need to run in production i dont think, i can check the rename concept also. i have physical file name of the vsam. with this, is there any chance to find the cics regions accessing this file..
Joined: 06 Jun 2008 Posts: 8233 Location: Dubuque, Iowa, USA
i have physical file name of the vsam. with this, is there any chance to find the cics regions accessing this file..
Contact your site support group and get their assistance.
Otherwise, there is no simple way to get that information -- you could, if you have access (many applications programmers do not), look at the CSD file for each CICS region and extract the file names to see if any match your file name. Of course, if the DD name is in the CICS region JCL, that DSN could override the CSD entry -- so you're not guaranteed that looking at the CSD files alone will give you all of them.
If I needed to do this, I'd run a batch job that allocated the DSN DISP=OLD and then find out which CICS regions are in contention for the data set name (console command D GRS,C for example). But many application programmers do not have access to console commands, either.