Joined: 06 Jun 2008 Posts: 8189 Location: East Dubuque, Illinois, USA
I have no idea what PSCICS1 is doing since you did not provide the PROC expansion. However, in general (and this is NOT tied to any specific release of CICS), a CICS command is specific to a region so if you want to close a file in two regions there have to be two commands issued to do this -- one in each region. Clever coding might allow you to have a single program that issues both commands, but two commands still need to be issued.
Joined: 14 Jan 2008 Posts: 2504 Location: Atlanta, Georgia, USA
After re-reviewing your post < sigh >, if REG1 contains the local file (FILE1) definition (FCT entry) and the remaining regions have a remote FCT entry pointing to REG1 (where the file actually lives), then all you need is to CLOSE the file in REG1 as CLO (UNENABLED is implicit and not required) or CLO DIS (override implicit UNENABLED).
Subsequently, when access to this same file is attempted in REG2 through REG10, then the request is function shipped to REG1, resulting in a CLOSED/UNENABLED or CLOSED/DISABLED status, depending on the command structure used in the JES MODIFY/CEMT command.
Most shops have their FCT entries to Open a given file on FIRSTREF, as long as the file is Enabled, an error would not be raised when accessed. With that, when you're done with FILE1, all you'll need to do is issue a CEMT SET FIL(FILE1) ENA (without the open) in REG1 and subsequently any program executing in REG1 through REG10, which needs access to FILE1, will implicitly open it due to the First Reference setting in REG1, basically turning this into a horse race and whoever gets there first wins.
Unless PSCICS1 has restrictions in TS 4.2, you can probably continue to use it.
The misunderstanding here is that there is an assumption that we have multiple FCT entries and that there are 10 physical files.
As I read this, there is only 1 physical file, every other region REG2 - REG10 simply point to it and the Mirror task CSMI is attached whenever a Function Ship request is issued for access to the Remote file from REG2 - REG10 (which is owned and local to REG1).
Closing FILE1 in REG1 will make it unavailable for all other regions that have it defined as Remote. So only 1 close is needed.