|
Before accessing a data set, your program must issue the OPEN macro
to open the data set for processing. Opening a data set causes VSAM
to take the following actions:
- Verify that the data set matches the description specified in
the ACB or GENCB macro (for example, MACRF=KEY implies that the data
set is a key-sequenced data set).
- Construct the internal control blocks that VSAM needs to process
your requests for access to the data set.
To determine which processing
options to use, VSAM merges information from the data definition (DD)
statement and catalog definition of the data set with information
in the access method control block and exit list. The order of precedence
follows:
- The DD statement AMP parameters
- The ACB, EXLST, or GENCB parameters
- The catalog entry for the data set
For example, if both an ACB or GENCB macro and the DD
statement have values for buffer space, the values in the DD statement
override those in the macro. The catalog entry is the minimum buffer
space when it is not specified in the DD statement or macro or when
it is less than the amount specified in the data set definition.
- Check for consistency of updates to the prime index and data components
if you are opening a key-sequenced data set, an alternate index, or
a path. If separate updates occur to data set and its index, VSAM
issues a warning message to indicate a time stamp discrepancy.
- An error during OPEN can cause a component that is open for update
processing to close improperly, leaving on the open-for-output indicator.
When VSAM detects an open-for-output indicator, it issues an implicit
VERIFY command and a message that indicates whether the VERIFY command
was successful.
If a subsequent OPEN is issued for update, VSAM
turns off the open-for-output indicator at CLOSE. If the data set
was open for input, however, VSAM leaves on the open-for-output indicator.
- Check the password your program specified in the ACB PASSWD parameter
against the appropriate password (if any) in the catalog definition
of the data. The system does not support passwords for system-managed
data sets. A password of one level authorizes you to do everything
that a password of a lower level authorizes. You must have RACF authorization
for the operation. The password requirement depends on the kind of
access that is specified in the access method control block:
- Full access lets you perform all operations (retrieve, update,
insert, and delete) on a data set on any associated index or catalog
record. The master password lets you delete or alter the catalog entry
for the data set or catalog it protects.
- Control-interval update access requires the control password or
RACF control authority. The control lets you use control-interval
access to retrieve, update, insert, or delete records in the data
set it protects. For information about the use of control-interval
access, see Processing Control Intervals.
Control-interval read access requires
only the read password or RACF read authority, that lets you examine
control intervals in the data set it protects. The read password or
RACF read authority does not let you add, change, or delete records.
- Update access requires the update password, which lets you retrieve,
update, insert, or delete records in the data set it protects.
- Read access requires the read password, that lets you examine
records in the data set it protects. The read password does not permit
you to add, change, or delete records.
Note: RACF protection supersedes password protection for
a data set. RACF checking is bypassed for a caller that is in supervisor
state or key 0. For more information on password and RACF protection,
see Protecting Data Sets.
|