View previous topic :: View next topic
|
Author |
Message |
DB2 Guy
New User
Joined: 28 Oct 2008 Posts: 98 Location: Cubicle
|
|
|
|
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 |
|
|
Robert Sample
Global Moderator
Joined: 06 Jun 2008 Posts: 8696 Location: Dubuque, Iowa, USA
|
|
|
|
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 |
|
|
dbzTHEdinosauer
Global Moderator
Joined: 20 Oct 2006 Posts: 6966 Location: porcelain throne
|
|
|
|
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 |
|
|
DB2 Guy
New User
Joined: 28 Oct 2008 Posts: 98 Location: Cubicle
|
|
|
|
Yup, they agreed now. |
|
Back to top |
|
|
enrico-sorichetti
Superior Member
Joined: 14 Mar 2007 Posts: 10873 Location: italy
|
|
|
|
agree about what ?
the shareoptions
or
not knowing their butt from a-hole-in-the-ground
meditate, meditate
cheers
enrico |
|
Back to top |
|
|
|