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

Close the VSAM files for Batch use


IBM Mainframe Forums -> JCL & VSAM
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
Satheeshkumar

New User


Joined: 20 Feb 2009
Posts: 51
Location: Chennai

PostPosted: Wed May 12, 2010 1:19 pm
Reply with quote

Hi,

My requirement is that i have to create a JCL.

Close the VSAM files for Batch use, if the VSAM file is defined for online transactions.

Can any one help me on this?
Back to top
View user's profile Send private message
expat

Global Moderator


Joined: 14 Mar 2007
Posts: 8797
Location: Welsh Wales

PostPosted: Wed May 12, 2010 3:06 pm
Reply with quote

What do you mean by closing the VSAM files for batch use ?
Back to top
View user's profile Send private message
Escapa

Senior Member


Joined: 16 Feb 2007
Posts: 1399
Location: IL, USA

PostPosted: Wed May 12, 2010 3:09 pm
Reply with quote

expat wrote:
What do you mean by closing the VSAM files for batch use ?

Does he mean restrict? just a guess..
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: Wed May 12, 2010 4:41 pm
Reply with quote

I guess you mean closing the VSAM files to CICS to allow Batch update?

Do your applications handle an INVREQ when the file is being updated by Batch and the application issues a READ for UPDATE, ADD or DELETE?

You can CLOSE the file to CICS, reset its attributes to REA BRO and reopen it if the applications recognize INVREQ.

There are a number of ways to close the file, such as a CEMT using a JES Modify command or an EXCI program from Batch which links to a CICS program which issues SET FILE API's or (as a last choice) to the older CEMT Programmable Interfaces DFHEMTA/DFHEMTP (neither are commended). Both of these interface usages requires a user-program in CICS which then issues a LINK-API to either. Note that DFHEMTA will return a return-code, whereas, DFHEMTP does not. The commarea passed to DFHEMTA consists of five 24-Bit storage addresses.

Bill
Back to top
View user's profile Send private message
Satheeshkumar

New User


Joined: 20 Feb 2009
Posts: 51
Location: Chennai

PostPosted: Wed May 12, 2010 5:27 pm
Reply with quote

we have to ADD OR DELETE the record in VSAM KSDS through batch.
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: Wed May 12, 2010 5:36 pm
Reply with quote

I think you need to discuss your issue with your site support group. Some sites have packages to close online files, some don't and your site support group will know your environment far, far better than we could. The wording of your question seems to imply you want to prevent batch updates while the online system is up and there is no practical way to do that -- unless you use your site security package to restrict access.
Back to top
View user's profile Send private message
Satheeshkumar

New User


Joined: 20 Feb 2009
Posts: 51
Location: Chennai

PostPosted: Wed May 12, 2010 5:55 pm
Reply with quote

we are going to delete few record from KSDS file, before deleting record if the VSAM file is defined(opened) for online transactions, it has to closed
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: Wed May 12, 2010 5:57 pm
Reply with quote

You need to talk to your site support group to find out what is available at your site. If your site does not have one of the packages that does this, as Bill said, there are a number of ways to do this. Which is used will depend upon your site standards and procedures, which we cannot know.
Back to top
View user's profile Send private message
dick scherrer

Moderator Emeritus


Joined: 23 Nov 2006
Posts: 19244
Location: Inside the Matrix

PostPosted: Thu May 13, 2010 6:13 am
Reply with quote

Hello,

Far less exciting, but many systems run these batch jobs when the online regions are down. Most users are not tolerant of taking away their access just because someone wants to run some batch job in the middle of the day.

If this file maintenance must be done while cics is up, why not run these updates in a cics program rather than a batch program?
Back to top
View user's profile Send private message
Satheeshkumar

New User


Joined: 20 Feb 2009
Posts: 51
Location: Chennai

PostPosted: Mon Jul 05, 2010 6:55 pm
Reply with quote

We are going to delete more number of records thats why we cannot do this in CICS program.

if the VSAM file is defined(opened) for online transactions,we have close this using batch job JCL instead of manual closing using CEMT transaction.

Can any one help me to write JCL(batch job) for this.


Thanks,
Sat
Back to top
View user's profile Send private message
dbzTHEdinosauer

Global Moderator


Joined: 20 Oct 2006
Posts: 6966
Location: porcelain throne

PostPosted: Mon Jul 05, 2010 7:06 pm
Reply with quote

Sat,

Quote:
Can any one help me to write JCL(batch job) for this.


as Robert said, this depends on what packages/vendor software you have at your site.

you need to ask your site support personnel,
as they are the only ones who know what is available.
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 -> JCL & VSAM

 


Similar Topics
Topic Forum Replies
No new posts Compare 2 files and retrive records f... DFSORT/ICETOOL 3
No new posts Compare 2 files(F1 & F2) and writ... JCL & VSAM 8
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
No new posts Compare only first records of the fil... SYNCSORT 7
Search our Forums:

Back to Top