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
 

 

Close the VSAM files for Batch use

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> JCL & VSAM
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    Post subject: Close the VSAM files for Batch use
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: 8593
Location: Back in jolly old England

PostPosted: Wed May 12, 2010 3:06 pm    Post subject:
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    Post subject:
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: 2502
Location: Atlanta, Georgia, USA

PostPosted: Wed May 12, 2010 4:41 pm    Post subject: Reply to: Close the VSAM files for Batch use
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    Post subject:
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: 8002
Location: Bellevue, IA

PostPosted: Wed May 12, 2010 5:36 pm    Post subject:
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    Post subject:
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: 8002
Location: Bellevue, IA

PostPosted: Wed May 12, 2010 5:57 pm    Post subject:
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

Site Director


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

PostPosted: Thu May 13, 2010 6:13 am    Post subject:
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    Post subject:
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    Post subject:
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    IBMMAINFRAMES.com Support Forums -> JCL & VSAM All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts Batch job tuning sgandhla Testing & Performance analysis 5 Fri Mar 24, 2017 9:41 pm
No new posts MIPS/CPU consumption reduction in Batch vishwakotin DFSORT/ICETOOL 4 Sat Mar 18, 2017 5:46 pm
No new posts Append data from two files into a sin... Praveen04 DFSORT/ICETOOL 5 Thu Mar 16, 2017 7:29 pm
No new posts Updating a VSAM file with DISP=OLD sheersh JCL & VSAM 8 Tue Mar 14, 2017 6:14 pm
No new posts SORT VSAM file with each field one by... maxsubrat DFSORT/ICETOOL 6 Tue Mar 14, 2017 1:07 pm


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