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

How to decide about Shareoptions in VSAM, please assist.


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

New User


Joined: 28 Oct 2008
Posts: 98
Location: Cubicle

PostPosted: Fri Aug 14, 2009 8:26 pm
Reply with quote

This a definition of VSAM I've created recently for one of my requirement. My question is about share options, are they fine, keeping in mind that this VSAM is going to be used ina batch process and not in CICS environment?

Code:
DEL XXX.XX.VSAM                             
DEF CL (NAME(XXX.XX.VSAM ) -                 
        INDEXED -                                           
        KEYS(20 00) -                                       
        FSPC(15 15) -                                       
        RECSZ(184 184) -                                   
        CISZ(4096) -                                       
        SPEED -                                             
        UNQ -                                               
        DATACLAS(VKEXT) -                                   
        MGMTCLAS(DBSTNDRD) -                               
        SHR(3 3)) -                                         
        DATA (NAME(XXX.XX.VSAM .DATA)) -     
        INDEX (NAME(XXX.XX.VSAM .INDEX) -   
        CISZ(512))                                         
  REPRO INFILE(DD01) -                                     
         OUTDATASET(XXX.XX.VSAM )           
  IF MAXCC < 9 THEN SET MAXCC=0                             

I went through the manuals to undestand but I'm not pretty sure if I understood them correctly. I belive using (2 3) is rather standard while my seniors suggests on (3 3) -- please assist me to get better interpretation of manuals. What is better and how do we decide that.
Quote:
SHAREOPTIONS(region system) (Abbreviation=SHR) - specifies the cross-region and cross-system sharing options for a VSAM data set. 'region' and 'system' are both numbers in the range 1 thru 4. 'region' values and their meanings are:

1 - all users read, only 1 can read & write to data
set concurrently
2 - all users read and 1 user writes concurrently
3 - all users read and write concurrently
4 - all users read and write concurrently, user
program must use ENQ/DEQ

'system' values and their meanings are:

1 & 2 - reserved
3 - all users read and write concurrently
4 - all users read and write concurrently, user
program must use ENQ/DEQ
Thank you so much for spending your time on my query.
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: Fri Aug 14, 2009 8:42 pm
Reply with quote

The main concern about SHR(3 3) is the potential for file corruption. If both batch and online can write to the file, you must incorporate enqueuing and dequeuing methods in your batch and online programs to guarantee read and write integrity. If you do not, the file is quite easily corrupted and must be restored from a back up to recover. The VSAM Demystified redbook says about cross-region option 3:
Quote:
VSAM allows many OPENs to the data set for output and/or input. The
user application programs must ensure both read and write integrity
through their own ENQs (including Open and Close processing on them).
Back to top
View user's profile Send private message
dbzTHEdinosauer

Global Moderator


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

PostPosted: Fri Aug 14, 2009 8:43 pm
Reply with quote

VSAM Demystified is not only a good read, it will spare you from asking 'seniors',
who do not know their butt from a-hole-in-the-ground,
questions.
Back to top
View user's profile Send private message
DB2 Guy

New User


Joined: 28 Oct 2008
Posts: 98
Location: Cubicle

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

Yup, they agreed now. icon_smile.gif
Back to top
View user's profile Send private message
enrico-sorichetti

Superior Member


Joined: 14 Mar 2007
Posts: 10873
Location: italy

PostPosted: Wed May 12, 2010 4:49 pm
Reply with quote

agree about what ?

the shareoptions
or
not knowing their butt from a-hole-in-the-ground

meditate, meditate icon_biggrin.gif

cheers
enrico
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 Access to non cataloged VSAM file JCL & VSAM 18
No new posts Merge two VSAM KSDS files into third ... JCL & VSAM 6
No new posts CVDA value for RRDS VSAM dataset. CICS 2
No new posts VSAM return code 23 - for a Random read COBOL Programming 4
No new posts Open VSAM File in IMS DC Region - DFS... IMS DB/DC 0
Search our Forums:

Back to Top