IBM Mainframe Forum Index
 
Log In
 
IBM Mainframe Forum Index Mainframe: Search IBM Mainframe Forum: FAQ Register
 

CICS 4.2 Version - Can we Close File in Multiple CICS Region


IBM Mainframe Forums -> CICS
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
sainathm

New User


Joined: 09 Feb 2009
Posts: 7
Location: bangalore

PostPosted: Thu Oct 10, 2013 3:16 pm
Reply with quote

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
View user's profile Send private message
Robert Sample

Global Moderator


Joined: 06 Jun 2008
Posts: 8696
Location: Dubuque, Iowa, USA

PostPosted: Thu Oct 10, 2013 5:14 pm
Reply with quote

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
View user's profile Send private message
Bill O'Boyle

CICS Moderator


Joined: 14 Jan 2008
Posts: 2501
Location: Atlanta, Georgia, USA

PostPosted: Fri Oct 11, 2013 5:22 am
Reply with quote

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
View user's profile Send private message
sainathm

New User


Joined: 09 Feb 2009
Posts: 7
Location: bangalore

PostPosted: Fri Oct 11, 2013 11:48 am
Reply with quote

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
View user's profile Send private message
Bill O'Boyle

CICS Moderator


Joined: 14 Jan 2008
Posts: 2501
Location: Atlanta, Georgia, USA

PostPosted: Sat Oct 12, 2013 4:51 am
Reply with quote

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
View user's profile Send private message
Bill O'Boyle

CICS Moderator


Joined: 14 Jan 2008
Posts: 2501
Location: Atlanta, Georgia, USA

PostPosted: Sat Oct 12, 2013 5:45 am
Reply with quote

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
View user's profile Send private message
colin777

New User


Joined: 06 Jun 2013
Posts: 19
Location: Singapore

PostPosted: Mon Oct 14, 2013 12:19 pm
Reply with quote

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
View user's profile Send private message
sainathm

New User


Joined: 09 Feb 2009
Posts: 7
Location: bangalore

PostPosted: Wed Oct 16, 2013 12:14 pm
Reply with quote

Thanks for the information Bill icon_smile.gif
Back to top
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   Reply to topic View Bookmarks
All times are GMT + 6 Hours
Forum Index -> CICS

 


Similar Topics
Topic Forum Replies
No new posts FTP VB File from Mainframe retaining ... JCL & VSAM 1
No new posts Extract the file name from another fi... DFSORT/ICETOOL 6
No new posts How to split large record length file... DFSORT/ICETOOL 10
No new posts Using API Gateway from CICS program CICS 0
No new posts INCLUDE OMIT COND for Multiple values... DFSORT/ICETOOL 5
Search our Forums:

Back to Top