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

Closing and Opening CICS VSAM files in batch


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

New User


Joined: 01 Mar 2007
Posts: 52
Location: chennai

PostPosted: Fri Sep 16, 2011 5:47 pm
Reply with quote

Hi,

For closing and opening CICS VSAM files, i used to enter into CICS region and give the command,

Code:
 CEMT SET FIL(VF*) CLO
- For Close
Code:
 CEMT SET FIL(VF*) OP
- For Open

I like to know whether this can be done in a batch mode. Is there any IBM utility available to do so.
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: Fri Sep 16, 2011 6:09 pm
Reply with quote

If you have access to the console commands, you can issue ONE of them in a batch job. However, since all console commands are executed independently of the batch job execution, entering both of them in a single job accomplishes nothing.

Many sites have written programs using the CICS API to perform this task. Check with your site support group to see if your site is one of them. If so, use it after talking to your site support group about the syntax and format of the command(s) required. There are also commercial products availabe to do this; your site support group would know if your site happened to purchase one of them.
Back to top
View user's profile Send private message
Selva-kumar

New User


Joined: 01 Mar 2007
Posts: 52
Location: chennai

PostPosted: Fri Sep 16, 2011 6:16 pm
Reply with quote

Hi,

Our site dont have any programs to do this task.

Quote:

If you have access to the console commands, you can issue ONE of them in a batch job.


Could you please tell me how to issue one of these two in a batch job. Its ok if i could accomplish the close operation in batch mode.
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: Fri Sep 16, 2011 7:21 pm
Reply with quote

Code:
// COMMAND 'F <region name>,SE FI(VF*) CLO DIS'
Note that closing the files in CICS does NOT deallocate them from the region, so if your batch job needs exclusive access to the files you must also include the DIS.

This is documented in the JCL Reference manual which can be found by clicking the Manuals link at the top of this page.
Back to top
View user's profile Send private message
Jose Mateo

Active User


Joined: 29 Oct 2010
Posts: 121
Location: Puerto Rico

PostPosted: Fri Sep 16, 2011 7:57 pm
Reply with quote

Good day to all!

At my site we have a product from McKinney called MTPBATCH which is a utility program to execute CICS commands from batch. Last thing I did with MTPBATCH was to set some files to read-only with just one MTPBATCH command, I think that was very cool.
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 Sep 16, 2011 8:27 pm
Reply with quote

At one time, IBM offered a non-supported (as in "free") Supportpac, named "CSF1", which can be used as a template for Opening/Closing Files from Batch, via EXCI, but they pulled it.

I do have a copy of "CSF1" and if you'd like, send me a private message if you're interested.

Mr. Bill
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 Compare 2 files and retrive records f... DFSORT/ICETOOL 2
No new posts Compare 2 files(F1 & F2) and writ... JCL & VSAM 8
No new posts Using API Gateway from CICS program CICS 0
No new posts Write line by line from two files DFSORT/ICETOOL 7
No new posts Access to non cataloged VSAM file JCL & VSAM 18
Search our Forums:

Back to Top