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

To restrict the access mode for VSAM files


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

New User


Joined: 19 Jul 2007
Posts: 30
Location: chennai

PostPosted: Mon Nov 22, 2010 12:47 pm
Reply with quote

Hi all,

Could you please let me know if there is any way to restrict the access mode of a VSAM file for a particular period of time.

Let me explain the requirement with an example.

Scenario

A job named SplitJOB splits a VSAM file, FILEA into 3 VSAM files - VSAM1, VSAM2 and VSAM3 for parallel processing in 3 jobs namely TierJOB1, TierJOB2 and TierJOB3. The 3 files gets updated in each of those 3 jobs. After the completion of all the 3 jobs, all the 3 separate files will be merged and loaded into the original VSAM file, FILEA through another job, MergeJOB.

Requirement

My requirement is to set READ ONLY mode for the VSAM file, FILEA to all additional jobs aJOB, bJOB and etc.. that runs in between the start time of the job SplitJOB and end time of the job MergeJOB.

Please let me know if you have any ideas which would suffice the requirement.


--
Thanks,
Vidhya
"If you have knowledge, let others light their candles with it. "
Back to top
View user's profile Send private message
expat

Global Moderator


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

PostPosted: Mon Nov 22, 2010 3:46 pm
Reply with quote

What do you mean split into three files. Are we talking about three identical files or are the files split by key range, or what.

Also explain the logic behind this file split.
Back to top
View user's profile Send private message
Vidhya Kalyanasundaram

New User


Joined: 19 Jul 2007
Posts: 30
Location: chennai

PostPosted: Mon Nov 22, 2010 4:07 pm
Reply with quote

No, all 3 are not identical files. The VSAM file, FILEA is a huge one containing billion of records. Hence in order to parallelise the process and reduce the overload in a single job, I have split the full volume of file into 3 files based on key range.

I just want to know if there is any option in batch similar to the IPCP NOUP option available in CICS. In CICS, we can restrict the ACCESS mode for a VSAM file for a particular period of time as shown below -

using the below IPCP commands we can allocate the file in online for READ ONLY mode
Code:

ALLOC DDNAME=FILEA, DSN=PVSAM.CICS.FILEA
OPEN DB FILEA                               
ENAB DB FILEA                       
NOUP DB FILEA


using the below IPCP commands we can allocate the file in online for UPDATE mode
Code:

ALLOC DDNAME=FILEA, DSN=PVSAM.CICS.FILEA
OPEN DB FILEA                               
ENAB DB FILEA                       
OKUP DB FILEA


Could you please let me know if there is any option in BATCH to set READ ONLY mode for a VSAM file for a particular period of time.

Thanks,
Vidhya
"If you have knowledge, let others light their candles with it. "
Back to top
View user's profile Send private message
expat

Global Moderator


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

PostPosted: Mon Nov 22, 2010 4:16 pm
Reply with quote

Certainly not that I am aware of.
Back to top
View user's profile Send private message
dbzTHEdinosauer

Global Moderator


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

PostPosted: Mon Nov 22, 2010 5:12 pm
Reply with quote

why split the file into 3 parts,
when you could split the transactions into 3 parts - for parallel runs
and non of the 3 would be incontention.

as far as restricting the access,
you have a solution for the CICS access
and batch you control under your scheduling system..........
Back to top
View user's profile Send private message
Vidhya Kalyanasundaram

New User


Joined: 19 Jul 2007
Posts: 30
Location: chennai

PostPosted: Tue Nov 23, 2010 10:59 am
Reply with quote

Fine. So, if we want to restrict the access via batch, we have only one option which could be done through the scheduler.

Or is there any way to restrict the access by modifying the attributes of the VSAM file via jcl?
Back to top
View user's profile Send private message
dbzTHEdinosauer

Global Moderator


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

PostPosted: Tue Nov 23, 2010 2:08 pm
Reply with quote

Suggest you read the Redbook VSAM Demystified and answer your own question.
Back to top
View user's profile Send private message
Pete Wilson

Active Member


Joined: 31 Dec 2009
Posts: 580
Location: London

PostPosted: Tue Nov 23, 2010 7:22 pm
Reply with quote

Do an ALTER FILEA SHROPT(1,3) at the start and ALTER FILEA SHROPT(2,3) afterwards
Back to top
View user's profile Send private message
expat

Global Moderator


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

PostPosted: Tue Nov 23, 2010 7:36 pm
Reply with quote

Pete, I did consider the use of SHR changes, but what happens if a batch job has the file already ???
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(F1 & F2) and writ... JCL & VSAM 4
No new posts HILITE on Browse mode? TSO/ISPF 2
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