Portal | Manuals | References | Downloads | Info | Programs | JCLs | Master the Mainframes
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Usergroups Profile Log in to check your private messages Log in
 

 

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

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> CICS
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    Post subject: CICS 4.2 Version - Can we Close File in Multiple CICS Region
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: 7913
Location: Bellevue, IA

PostPosted: Thu Oct 10, 2013 5:14 pm    Post subject:
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: 2502
Location: Atlanta, Georgia, USA

PostPosted: Fri Oct 11, 2013 5:22 am    Post subject: Reply to: CICS 4.2 Version - Can we Close File in Multiple C
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    Post subject:
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: 2502
Location: Atlanta, Georgia, USA

PostPosted: Sat Oct 12, 2013 4:51 am    Post subject: Reply to: CICS 4.2 Version - Can we Close File in Multiple C
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: 2502
Location: Atlanta, Georgia, USA

PostPosted: Sat Oct 12, 2013 5:45 am    Post subject: Reply to: CICS 4.2 Version - Can we Close File in Multiple C
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    Post subject:
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    Post subject: Thanks for the information Bill
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    IBMMAINFRAMES.com Support Forums -> CICS All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts CICS START AND CANCEL blayek CICS 1 Wed Dec 07, 2016 3:27 am
No new posts Add PD field from 2nd file to PD in 1st Sushant Garje DFSORT/ICETOOL 6 Thu Dec 01, 2016 4:32 pm
No new posts How does a called pgm know if its cal... Graeme Westerman COBOL Programming 4 Tue Nov 29, 2016 9:25 pm
No new posts File Aid to File Manager conversion murali3955 IBM Tools 4 Thu Nov 24, 2016 3:41 pm
No new posts How to convert the VBM file to VB or... Sulabh Agrawal JCL & VSAM 4 Fri Nov 18, 2016 1:04 pm


Facebook
Back to Top
 
Mainframe Wiki | Forum Rules | Bookmarks | Subscriptions | FAQ | Tutorials | Contact Us