Portal | Manuals | References | Downloads | Info | Programs | JCLs | Mainframe wiki | Quick Ref
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Profile Log in to check your private messages Log in
 
To restrict the access mode for VSAM files

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

PostPosted: Mon Nov 22, 2010 3:46 pm    Post subject:
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    Post subject: To restrict the access mode for VSAM files
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: 8593
Location: Back in jolly old England

PostPosted: Mon Nov 22, 2010 4:16 pm    Post subject:
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: 6968
Location: porcelain throne

PostPosted: Mon Nov 22, 2010 5:12 pm    Post subject:
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    Post subject: To restrict the access mode for VSAM files
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: 6968
Location: porcelain throne

PostPosted: Tue Nov 23, 2010 2:08 pm    Post subject:
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 User


Joined: 31 Dec 2009
Posts: 445
Location: London

PostPosted: Tue Nov 23, 2010 7:22 pm    Post subject:
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: 8593
Location: Back in jolly old England

PostPosted: Tue Nov 23, 2010 7:36 pm    Post subject:
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    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 User access certification In Mainfram... Virendra Shambharkar All Other Mainframe Topics 4 Tue Oct 03, 2017 12:32 pm
No new posts VSAM RLS Wait time blayek JCL & VSAM 2 Mon Oct 02, 2017 9:05 pm
No new posts FTP Skip or ignore error and process ... AJAYREDDY All Other Mainframe Topics 3 Wed Sep 27, 2017 8:12 pm
No new posts Comparing 2 Files using Current time arunsoods SYNCSORT 9 Fri Sep 22, 2017 6:00 pm
No new posts Split 1 file into 10 output Files - S... Prasanth Kumar SYNCSORT 5 Sat Sep 16, 2017 12:02 am

Facebook
Back to Top
 
Job Vacancies | Forum Rules | Bookmarks | Subscriptions | FAQ | Polls | Contact Us