View previous topic :: View next topic
|
Author |
Message |
sainathm
New User
Joined: 09 Feb 2009 Posts: 7 Location: bangalore
|
|
|
|
Hi All,
Whenever we want to close files we specify a file name and the region in which we want to close the file. like below.
STEP1 EXEC PSCICS1
STEP1.INPFILE DD *
CICSREGION1
DAT ITM CLO FILENAME
STEP1 EXEC PSCICS1
STEP1.INPFILE DD *
CICSREGION2
DAT ITM CLO FILENAME
In CICS v4.2 Is there a way to close the files in multiple CICS regions with just one command?
Please advise.
Thanks |
|
Back to top |
|
|
Robert Sample
Global Moderator
Joined: 06 Jun 2008 Posts: 8696 Location: Dubuque, Iowa, 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. |
|
Back to top |
|
|
Bill O'Boyle
CICS Moderator
Joined: 14 Jan 2008 Posts: 2501 Location: Atlanta, Georgia, USA
|
|
|
|
sainathm queried -
Quote: |
"In CICS v4.2 Is there a way to close the files in multiple CICS regions with just one command?" |
If you're running CICSPlex, then writing a REXX routine (invoking CPSM) can close all files, a group of files or individual ones. |
|
Back to top |
|
|
sainathm
New User
Joined: 09 Feb 2009 Posts: 7 Location: bangalore
|
|
|
|
Thanks for the response Bill & Robert.
We are not running on CICSPlex, is there any other way we do this?
I have 10 CICS regions REG1 thru REG10, FILE1 is defined locally in REG1 and remotely in other regions.
If I give a logical name of the FILE1 as an input, I should be able to close the FILE1 in all the CICS Regions.
Please advise.
Thanks. |
|
Back to top |
|
|
Bill O'Boyle
CICS Moderator
Joined: 14 Jan 2008 Posts: 2501 Location: Atlanta, Georgia, USA
|
|
|
|
Ask your Tech Support and/or System Programmer (z/OS, CICS) if you can use JES MODIFY commands embedded in an IEBGENER Job, using the "CEMT SET FIL" format.
In lieu of not having a 3rd-party facility, such as CAFC, then this would be the easiest and cheapest. No programming required.
The drawback is you won't get a return code for each MODIFY command, just a return code for the entire JOB/STEP. |
|
Back to top |
|
|
Bill O'Boyle
CICS Moderator
Joined: 14 Jan 2008 Posts: 2501 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.
HTH.... |
|
Back to top |
|
|
colin777
New User
Joined: 06 Jun 2013 Posts: 19 Location: Singapore
|
|
|
|
Great answer Bill,
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.
HTH
Colin777 |
|
Back to top |
|
|
sainathm
New User
Joined: 09 Feb 2009 Posts: 7 Location: bangalore
|
|
|
|
Thanks for the information Bill |
|
Back to top |
|
|
|