View previous topic :: View next topic
|
Author |
Message |
Vidhya Kalyanasundaram
New User
Joined: 19 Jul 2007 Posts: 30 Location: chennai
|
|
|
|
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 |
|
|
expat
Global Moderator
Joined: 14 Mar 2007 Posts: 8797 Location: Welsh Wales
|
|
|
|
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 |
|
|
Vidhya Kalyanasundaram
New User
Joined: 19 Jul 2007 Posts: 30 Location: chennai
|
|
|
|
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 |
|
|
expat
Global Moderator
Joined: 14 Mar 2007 Posts: 8797 Location: Welsh Wales
|
|
|
|
Certainly not that I am aware of. |
|
Back to top |
|
|
dbzTHEdinosauer
Global Moderator
Joined: 20 Oct 2006 Posts: 6966 Location: porcelain throne
|
|
|
|
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 |
|
|
Vidhya Kalyanasundaram
New User
Joined: 19 Jul 2007 Posts: 30 Location: chennai
|
|
|
|
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 |
|
|
dbzTHEdinosauer
Global Moderator
Joined: 20 Oct 2006 Posts: 6966 Location: porcelain throne
|
|
Back to top |
|
|
Pete Wilson
Active Member
Joined: 31 Dec 2009 Posts: 580 Location: London
|
|
|
|
Do an ALTER FILEA SHROPT(1,3) at the start and ALTER FILEA SHROPT(2,3) afterwards |
|
Back to top |
|
|
expat
Global Moderator
Joined: 14 Mar 2007 Posts: 8797 Location: Welsh Wales
|
|
|
|
Pete, I did consider the use of SHR changes, but what happens if a batch job has the file already ??? |
|
Back to top |
|
|
|