Você está na página 1de 4

The catalog will be updated from the verified information in the VSAM

control blocks when the VSAM data set which was opened for output is
successfully closed.
The actual VSAM control-block fields that get updated depend on the type
of data set being verified. VSAM control block fields that can be updated
include High used RBA/CI for the data set, High key RBA/CI, number of
index levels, and RBA/CI of the first sequence set record.
The VERIFY command should be used following a system failure that
caused a component opened for update processing to be improperly
closed. Clusters, alternate indexes, entry-sequenced data sets, and
catalogs can be verified. Paths over an alternate index and linear data sets
cannot be verified. Paths defined directly over a base cluster can be
verified.
The VERIFY macro will perform no function when VSAM RLS is
being used.
VSAM RLS is responsible for maintaining data
set information in a shared environment.
Although the data and index components of a key-sequenced cluster or
alternate index can be verified, the timestamps of the two components are
different following the separate verifies, possibly causing further OPEN
errors. Therefore, use the cluster or alternate index name as the target of
your VERIFY command. You should issue the VERIFY command every time
you open a VSAM cluster that is shared across systems. For information
about using VERIFY with clusters that are shared, see Cross-System
Sharing.
Recovering from Errors Due to an Improperly Closed VSAM Data Set
Sometimes a data set is closed properly, but an error occurred. The most
likely error is an incorrect high RBA in the catalog. Other possible errors are
an incomplete write to a DASD or duplicate data exists. One way to avoid
these errors is by doing synchronous direct inserts. Another way is by
using abnormal termination user exits in which you issue a CLOSE
(perhaps with the TYPE=T parameter) to close the data set properly.

If you suspect that a write operation is incomplete, issue either an IMPORT


or REPRO command to get an old copy of the data. Intermediate updates
or inserts are lost. You must have an exported version of the data set
available to use IMPORT. Use a backup copy for REPRO.
Duplicate data in a key-sequenced data set, the least likely error to occur,
can result from a failure during a control interval or control area split. To
reduce the number of splits, specify free space for both control intervals
and control areas. If the failure occurred before the index was updated, the
insert is lost, no duplicate exits, and the data set is usable.
If the failure occurred between updating the index and writing the updated
control interval into secondary storage, some data is duplicated. However,
you can access both versions of the data by using addressed processing. If
you want the current version, use REPRO to copy it to a temporary data set
and again to copy it back to a new key-sequenced data set. If you have an
exported copy of the data, use the IMPORT command to obtain a
reorganized data set without duplicate data.
If the index is replicated and the error occurred between the write
operations for the index control intervals, but the output was not affected,
both versions of the data can be retrieved. The sequence of operations for
a control area split is similar to that for a control interval split. To recover
the data, use the REPRO or IMPORT command in the same way as for the
failure described in the previous paragraph.
Use the journal exit (JRNAD) to determine control interval and control area
splits and the RBA range affected.

Using VERIFY with Catalogs


VSAM OPEN calls VERIFY when it opens a catalog.
You cannot use VERIFY to correct catalog records for a key-sequenced data
set, or a fixed-length or variable-length RRDS after load-mode failure. An
entry-sequenced data set defined with the RECOVERY attribute can be

verified after a create (load) mode failure; however, you cannot run VERIFY
against an empty data set or a linear data set.
Any attempt to do either will result in a VSAM logical error.
Replicate and Imbed (INDEXED clusters only)
REPLICATE specifies that VSAM should write each index record on a track as
many times as it will fit. IMBED specifies that sequence set records are to be
imbedded with the data in the data component of the cluster. When the
sequence set is imbedded in the data component, VSAM writes each sequence
set record on the first track of its associated control area. IMBED automatically
implies REPLICATE. Without imbedding, the sequence set records are kept in the
index component with other index records. The use of REPLICATE and IMBED
may improve performance at the expense of an increase in storage
requirements.

Pre-Formatting Space
The SPEED / RECOVERY parameters are used to specify whether or not VSAM
should preformat the space allocated to the cluster as part of the DEFINE
process. Specifying RECOVERY (the default) causes the allocated space to be
filled with end-of-file markers. If the initial load of the cluster with data should
fail before completion, the end-of-file markers can be used to resume the load
from the point of failure. For large datasets, this can save recovery time,
however there is a trade-off in time to write the end-of-file markers during the
definition of the cluster.

01 WS-FILE-STATUS-FLAG
88 SUCCESSFUL-COMPLETION

PIC X(02).
VALUE '00'.

88 END-OF-FILE

VALUE '10'.

88 SEQUENCE-ERROR

VALUE '21'.

88 DUPLICATE-KEY
88 NO-RECORD-FOUND
88 NO-MORE-SPACE
88 UNCORRECTABLE-IO-ERROR

VALUE '22'.
VALUE '23'.
VALUE '24'.
VALUE '30'.

88 VSAM-LOGIC-ERROR

VALUE '90'.

88 FILE-NOT-OPEN

VALUE '92'.

Return code 90 is also acceptable at times and is checked in program logic.

Você também pode gostar