The SHAREOPTIONS (or SHROPTNS) parameter specifies how the component or cluster can be shared among users within one system or across systems.
TPX handles the integrity of the VSAM files itself using record 0 the VSI (VSAM sharing record).
Since we handle the integrity we want VSAM to do nothing, therefore, we use SHAREOPTIONS(4,3).
The Cross-region option helps in concurrent data access on a stand-alone system, for example TSO or CICS.
The Cross-system helps in data access for multiple computers (Two or more different computers that are interconnected)
The values of the various possible values for the above are mentioned below with their meanings:
- Multiple jobs can read only if no update takes place - Complete data integrity.
- Multiple jobs can read and at the same time one job can update - Write, but not read integrity.
- Multiple jobs can read & write simultaneously - No integrity - Users are responsible for integrity.
- Same as option 3, but refreshes buffer after every read.