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
 

 

How to decide about Shareoptions in VSAM, please assist.

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> JCL & VSAM
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    Post subject: How to decide about Shareoptions in VSAM, please assist.
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: 7996
Location: Bellevue, IA

PostPosted: Fri Aug 14, 2009 8:42 pm    Post subject:
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    Post subject:
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    Post subject:
Reply with quote

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

Global Moderator


Joined: 14 Mar 2007
Posts: 10231
Location: italy

PostPosted: Wed May 12, 2010 4:49 pm    Post subject: Reply to: How to decide about Shareoptions in VSAM, please a
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    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 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
No new posts VSAM RLS=NRI while doing IDCAMS sheersh JCL & VSAM 1 Tue Mar 07, 2017 1:55 pm
No new posts Fail to change physical VSAM filename... jacobdng CICS 7 Fri Jan 20, 2017 12:36 pm
No new posts how to recover an uncataloged VSAM da... archanamuthukrishnan All Other Mainframe Topics 4 Wed Jan 11, 2017 6:18 pm


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