Cics VR
Cics VR
IBM TotalStorage ™
IBM TotalStorage ™
IBM TotalStorage ™
So what is forward recovery ? Forward recovery consists of applying the changes that occurred to a backup copy of the data.
And why would you want to forward recover data ? One of the corollaries to Murphy's law says that the data will become
unusable just prior to the next backup. If it were my bank and they lost all the checks I've written I don't think that would bother
me, but with my luck it be would the deposits that disappeared.
What causes you to want to forward recover ? It could a software failure (our software or yours), the hardware could fail (though
that is becoming rarer and rarer), or you could be doing disaster recovery or it could be a user error of some sort.
What are the steps to forward recover ? Restore the last good backup and then apply the changes that have occurred to the
data (adds/updates/deletes).
CICSVR Overview
What is CICSVR ?
For CICS/ESA V4 provides backout failure recovery and
Forward Recovery for VSAM files updated through CICS
For CICS/TS provides Forward Recovery for VSAM files
updated through CICS (backout failure is not supposed to
occur under CICS/TS)
CICSVR 3.1 adds support for updates done outside of
CICS (i.e. your batch jobs) for CICS/ESA and CICS/TS
IBM TotalStorage ™
What is CICSVR ? It's product to provide forward recovery capabilities for VSAM files. In CICSVR 2.3 this is limited to files
accessed updated through CICS. In CICSVR 3.1 there is support for VSAM data sets updated outside of CICS. More on this
later on. CICSVR 2.3 does by processing the forward recovery data logged by CICS. CICSVR 2.3 only has the ability to do
forward recovery for updates that were down through CICS. CICSVR 3.1 does not have this limitation.
Supports currently supported releases of CICS.
For CICS/ESA V4 there is the possibility that transaction backout processing may fail. CICSVR does provide recovery for this
possibility and for forward recovery.
In CICS/TS transaction backout failure is not supposed to happen (and if it does, it's a CICS problem) so CICSVR does not
provide support for that, but does support forward recovery for VSAM files including those using RLS.
CICSVR Overview Continued
IBM TotalStorage ™
CICSVR consists of an ISPF application to manage the recovery process and the data used and several batch functions. With
CICSVR 3.1 there is also a CICSVR address space.
CICSVR uses Recovery Control Data Sets (RCDS's) to store data about what files have forward recovery images, what
journals or log streams that data is in, and if there are copies of the journals or log streams.
Each instance of CICSVR has three RCDS that are mirrors of each other. Assuming these are on different devices having
three copies minimizes the possibility that all three would be lost. CICSVR checks that each one contains the same
information. If you need to expand the size this can be done by deleting one of them, reallocating it larger and running one of
the CICSVR batch functions.
The batch functions consist of copying either the journal or log stream data to a portable copy, updating the RCDS with the
information contained in the copied records, running forward recovery or backout processing
CICSVR Overview Continued
IBM TotalStorage ™
The batch functions for CICSVR are different for CICS/ESA and CICS/TS becuase of the differences in how CICS does it's
logging of updates.
For CICS/ESA there are three batch functions. The first is the archive process, which we provide a job step to be added to the
job submitted by CICS from DFHJPDS when journals switch. This function copies the forward recovery log records to a
sequential dataset and updates the RCDS's with the inofrmation found when copying the forward recovery log records. The
second function is the recover function which will do forward recovery. The last function is backout which can be run to backout
uncommited LUW's as a result of dynamic transaction backout failure and/or emergency restart backout failure.
For CICS/TS there are three functions. The first is the LOGOFLOGS SCAN which scans the LOGOFLOGS registered in the
RCDS to update the RCDS with information about the various VSAM spheres and the forward recovery logstreams used. It will
also issue logical deletes for any data on the any of the logstreams it processes for data that is older than the retention period
specified. The second function LOGSTREAM COPY reads a logstream and produces a copy that can be used as input for
forward recovery or transported/transmitted to a disaster recovery site. The third function is the recover function which will do
forward recovery.
What's new in CICSVR 3.1
IBM TotalStorage ™
With CICSVR there are several new functions. Some of these are only available with OS/390 2.10 or z/OS (with the
appropriate ptfs). Of the items on this page, only batch logging requires the services of the CICSVR address space which is
only available with OS/390 2.10 or higher releases. The change accumulation function is enhanced if you use the CICSVR
address space, but it's not a requirement. We'll cover these items that require and use the CICSVR address space in the next
few foils, but let's cover the ones that don't require the CICSVR address space now.
CICSVR 3.1 nows allows you to specify a retention period for logstream copies and will delete and uncatalog copies past that
date. Note that this date can be different for the retention period for logstream data.
CICSVR 3.1 now provides a utility to easily create a copy of your RCDS's for either backup purposes or for use at a disaster
recovery site.
Prior to CICSVR 3.1 if you were recovering a number of files and one of them failed, then CICSVR would stop processing at
that point. You can specify that it should continue and deal with the problems afterwards.
In CICSVR 2.3 when you went to display the list of VSAM spheres, CICSVR would bring up every one that new about. With
CICSVR 3.1 you can specify a filter to search on. CICSVR 2.3 only displays information about the registered LOGOFLOGS.
With CICSVR 3.1 you can now see information about all logstreams that CICSVR knows about. CICSVR 3.1 also provides
several new displays of the log streams that CICSVR knows about including the forward recovery log streams.
CICSVR 3.1 new functions - OS/390 2.10 or higher - I
IBM TotalStorage ™
With CICSVR 3.1 we've added an address space to coordinate the processing of various functions and to provide a way for
multiple address spaces to communicate. It's normally started at IPL time during SMS initialization. It can be shutdown and
restarted via operator commands. Support for this address space was provided in the DFSMS component at the HDZ11F0
level by PTF UW79809. There are also a few other PTFS required for DFSMShsm, DFSMSdss and DFSORT. If you have not
installed this PTF yet, please pay very close attention to the HOLD Action for this PTF (UW79809). Failure to follow the hold
action will result in your system being unable to finish ipling. See info apar II13131 for more information about this PTF.
CICSVR 3.1 new functions - OS/390 2.10 or higher - II
Batch Logging
Provides forward recovery logging for VSAM Sphere's
accessed outside of CICS
Works with any VSAM Spheres except:
Non SMS managed Spheres, Linear Data Sets,
RLS, CI, ICIP Processing, Temporary Data Sets,
Key Range Data Sets, Data Sets defined with IMBED,
Catalogs, logical record size > 64000,Extended
Addressability ESDSs, Checkpoint/Restart
Processing,Alternate Indexes (Paths are supported)
IBM TotalStorage ™
Batch logging is one of the biggest new functions in CICSVR 3.1. It's designed for the case where you either shutdown CICS or
close the VSAM spheres to CICS to run batch processing against those spheres. As such it's meant for KSDS, ESDS, RRDS,
VRRDS datasets that ARE SMS managed. You can see the list of types of sphere's and types of processing that are not
supported, but we don't feel that these are used in most applications. In some cases these functions are going away, such as
IMBED. In other cases there are restrictions in other components such as system logger's restriction on the size of data that
can be written to a logstream.
CICSVR 3.1 new functions - OS/390 2.10 or higher - III
IBM TotalStorage ™
Batch logging does have the listed requirements. You need to have the CICSVR address space active, so that your batch job
when it opens a sphere for update, can obtain a token from system logger and have the address space do the logging. To
specify that a VSAM sphere is to have forward recovery logging done for requires the sphere to have both FRLOG and
LOGSTREAM values available. These can be specified on a define or alter of the sphere, in the JCL via the AMP parameter,
or these can be set in a SMS DATACLAS for the sphere.
Note the length of the unit of work for batch logging is from Open to Close of the sphere.
There are also CICS ptfs required to disable batch logging when a sphere is opened by CICS. These PTFS are: UQ58176 for
CICS/ESA 4.1, UQ58177 for CICS/TS 1.2, UQ58178 for CICS/TS 1.3 and UQ58348 for CICS/TS 2.1. The reason for disabling
batch logging is that CICS is providing the logging function when it opens the sphere.
CICSVR 3.1 new functions - OS/390 2.10 or higher - IV
IBM TotalStorage ™
With CICSVR 3.1 both DFSMShsm and DFSMSdss will communicate with the CICSVR address space to update the
information the RCDS about the available backups and how they were done. Also if you are using change accumulation, the
backup date and time is updated when using DFSMShsm and DFSMSdss. This can save you from having to manually enter
these updates.
CICSVR 3.1 new functions - Change Accumulation
IBM TotalStorage ™
One of the original developers for CICSVR came from IMS, which is why you can see some similarities between CICSVR and
IMS. For example IMS uses three RECON datasets and CICSVR uses three RCDS's. One of the things new with CICSVR 3.1
is change accumulation which works pretty much the same way as IMS change accumulation. The idea behind this is that if
you are constantly updating the same record and you need to forward recover, then the only change you need to make to that
record is the last one. With CICSVR you do need to setup change accumulation groups and then run the change accumulation
batch jobs. These will create a change accumulation dataset which can be used as input into the forward recovery process.
One of the things about change accumulation is that it needs to know when the last time a backup was done. If you are not
using the CICSVR address space, then you need to update this value manually. If you have the CICSVR address space active
and use DFSMShsm or DFSMSdss to do your backups, then they will automaticly update the backup time.
CICSVR Hints & Tips - CICS/TS
IBM TotalStorage ™
The next few foils are some hints and tips for running CICSVR with CICS/TS. In most cases they apply to both CICSVR 2.3 and
3.1, any exceptions will be noted.
We suggest that you setup a job to run a LOGOFLOGS SCAN several times during the day. This will update the RCDS with
information about VSAM spheres that are closed or opened during this period. It will also scan the logoflogs logstreams and
forward recovery logstreams and issue a logical delete for any data older than the retention period. The actual physical delete
will occur either during the next offload or when all users of the logstream disconnect.
If you are running LOGSTREAM COPY to copy the forward recovery logstreams multiple times during the day, you can easily
generate a number of datasets. One of our customers came up with the solution shown on the foils. In their case they create a
new GDG each night at midnight, then during the day, when the LOGSTREAM COPY runs, they "mod" on to the GDG. Use of
the MOD keyword for the LOGSTREAM COPY ensures that CICSVR stores the information correctly in the RCDS.
We're constantly amazed at the number of customers that do not have the ISPF panels setup or know how to invoke them.
While most functions can be done with a batch job, the ISPF application does make some of the functions much easier. And
we in level 2 will ask you to tell us what they show if you do have problems.
CICSVR Hints & Tips - CICS/TS
IBM TotalStorage ™
One thing to keep in mind when using CICSVR is that the retention period for forward recovery should be set to a realistic
value. For example, if you do daily backups of your data sets how far back are you going to need to go to recover a data set ?
For system performance try to minimize the amount of data that system logger needs to manage. While system logger can
hold huge amounts of data (I've seen 18 months worth in a logstream), there some functions that will want to process ALL of
that data. Reading 18 months (or two weeks) worth can take time. Logstream copies created by LOGSTREAM COPY are much
easier to manage from a storage administration point of view.
CICSVR Hints & Tips - CICS/TS
IBM TotalStorage ™
One of the biggest problems we see with logstreams in general, is allowing the log data set (aka the offload data sets) to be
migrated to tape. It doesn't who the user of the logstream is (CICS,CICSVR,OPERLOG,LOGREC,etc). Each has a function that
will cause the entire logstream to be read and if they are not online, they will get recalled. Recalling 100 or 1000 datasets takes
time. In general, the volumes that have logstreams should NOT be subject to migration, backup, space management or any
sort of retention period managment specified via DFSMS.
While we do enjoy talking with you, we'd rather you apply the maintenance that is available so that you don't have problems.
We strongly suggest that you use the ISPF panels to build your recovery JCL as making sure you get all the parameters correct
can be a challenge if you are not familiar with the syntax. Also, the panels will help you get the correct start time (if it's off by a
second you may not get the recovery you want). CICSVR will also build as few steps as possible in the job to recover your
spheres. If you need to recover 10 spheres that are logging to the same forward recovery log, it will create a single step job to
do this.
CICSVR Hints & Tips - CICS/TS
IBM TotalStorage ™
If speed of forward recovery is most important and you have the additional dasd, you can do shadow forward recovery. In
essence you have a second copy of a VSAM sphere to which you are applying forward recovery records. In the case of failure
of the original data set you can either rename or delete/define the original and reproing shadow copy into the original, after
running the last forward recovery.
Differences in Logging CICS/ESA vs CICS/TS - I
CICS/ESA logging
All logging goes to sequential datasets called journals
Journals consists of two data sets (A and B)
System logging has third dataset (X) that is used in case
of emergency restart
When journal is full, CICS switches to other which
allows ability to archive/copy journal while not in
use by CICS (A switches to B, B switches to
A) Journals are numbered (01-99)
System logging always goes to
journal 01 State, Forward Recovery, User
logging can all use same journal or different journals
IBM TotalStorage ™
CICS prior to CICS/TS used physical sequential data sets. This comes from when CICS was first developed back in 1968. At
that point in time they were the fastest access method. The last major revision of the code that does the logging was in 1986.
There were several minor enhancements added after that including a function that more or less eliminated the problem of
overwriting the data sets before they could be archived. This more or less worked well when a large company would have 2 or
3 CICS regions to run their production environment. When companies began running 400-1000 CICS regions for their
production environments, it became difficult to manage.
But this is still what a number of customers are running and are familiar with. If they are currently using CICSVR, they have it
setup and running and have adapted to how it works.
But with CICS/TS a large number of things change in this area. In addition to all the other things that change with CICS/TS,
customers get to adapt to the changes in how CICSVR works with CICS/TS.
Differences in Logging CICS/ESA vs CICS/TS - II
CICS/TS logging
All logging goes to log streams
Journals are mapped to logstreams
CICS uses two logstreams (DFHLOG & DFHSHUNT)
for system logging including transaction backout
Forward recovery logging will not be intermixed with
system logging
User logging can be intermixed with Forward Recovery
logging or can be directed to different logstream
(different log streams are HIGHLY recommended)
Journal DFHJ01 is not used by system (can be user
or Forward Recovery logging)
IBM TotalStorage ™
CICS does three types of logging. The first is state logging which keeps track of how many transactiona are in the system, what
resources they have updated, what other systems are connected to CICS such as IMS or DB2 and how often CICS is to take a
keypoint. Forward recovery logging is a function of CICS to log updates to VSAM files that are defined as recoverable and as
forward recoverable. While some of the same data is also kept as part of the state logging the forward recovery logs only
contain the data needed for forward recovery. User defined logging comes in two flavors: system and application driven. By
specifying certain parameters on the file definition, any access to the records within can be logged. This may also duplicate
some of the forward recovery data. Applications can also write their own log records.
Conceptual View of a logstream
Application Instance 1
Log stream
Application Instance 2
IBM TotalStorage ™
Here's a conceptual view of a log stream. The log stream consists of log blocks written by applications such as CICS, logrec,
operlog, IMS. The contents of the log block is determined by the application writing it. In the case of CICS for forward recovery
it consists of before and after images of VSAM records. Note that multiple instances of an application can be reading and
writing to the logstream.
Log streams are always duplexed. This means the data in the log stream exists in two places (and only two places).
There are two types of logs streams; coupling facility and dasd-only. The biggest difference between the two is the scope of
sharing that can be achieved. Dasd-Only log streams can be shared by applications within a single system. Coupling facility
logstreams can shared by multiple systems in a sysplex.
Coupling Facility View for logger
System 2
System 2
Staging
System 1 Data Set
Staging LOGR Couple
Data Set Data Set
Key:
Local Storage Buffers
System Logger
Application Instance 1
Application Instance 2
IBM TotalStorage ™
Here's a view of how coupling facility logstreams are setup in a two system sysplex. Note that each system must have access
to the coupling facility and the couple datasets (both LOGR and CFRM couple data). While the picture shows staging data sets,
they are not a requirement as the data in interim storage will be duplexed into dataspaces on the systems from the logger
address space. If your coupling facility is volatile, you should plan for staging data sets in case of errors in the coupling facility.
With coupling facility log streams you can choose to duplex the data either to a dataspace in logger address space, to dasd
staging data sets, or with z/OS 1.2 to another coupling facility in a structure that is eligible for system managed duplexing
rebuild. These options are specified in the LOGR policy and CFRM policy (if using system managed duplexing rebuild).
Note that when the coupling facility logstream fills, the data is hardened by writing it to DASD log data sets. Also when the last
system connected to a log stream disconnects, the remaining data in the coupling facility is also written out to DASD log
datasets. This process is known as offloading.
DASD-Only View for logger
System 1
Staging LOGR Couple
Data Set Data Set
Key:
Local Storage Buffers
System Logger
Application Instance 1
IBM TotalStorage ™
With DASD-Only log streams, picture is a bit simpler. The biggest issue to remember is that DASD-Only log streams are single
system in scope. They can be shared by multiple address spaces in that system. Also with DASD-Only log streams staging
data sets are always allocated to ensure duplexing of interim data on the log stream.
CICSVR system logger setup recommendations
IBM TotalStorage ™
When defining your forward recovery log streams and LOGOFLOGS log streams with the utility IXCMIAPU these are our
recommendations. For HIGHOFFLOAD a value of 80 allows the log stream to fill until it hits 80 percent before logger off load
processing is kicked off. Setting the LOWOFFLOAD in the range of 40-60 percent should minimize the amount of time spent in
offload processing. AUTODELETE should be set to NO to ensure that data is not deleted until the application (in this case
CICSVR) issues a delete for the data. RETPD should be set to zero. This will allow the automatic register function of CICSVR
to delete the data after the retention period expires (and allow logger to clean up log data sets).
CICSVR automatic deregister setup - CICSVR 2.3
IBM TotalStorage ™
Here's how to set up the CICSVR automatic deregister function under CICSVR 2.3. It's not the easiest thing to find in the ISPF
panels.
When setting the retention period be sure and set it to a reasonable value that will cover your need to forward recover. For
example, if backups are taken every day do you really need to have the retention period set to 30 days ?
CICSVR automatic deregister setup - CICSVR 3.1
IBM TotalStorage ™
Here's how to set up the CICSVR automatic deregister function under CICSVR 3.1. It's a little different and easier to find than
CICSVR 2.3.
When setting the retention period be sure and set it to a reasonable value that will cover your need to forward recover. For
example, if backups are taken every day do you really need to have the retention period set to 30 days ?
With CICSVR 3.1 you get to specify two values. One for the LOGOOFLOGS log stream and Forward Recovery log streams
and a second for any log streams you create via the LOGSTREAM COPY function.
CICSVR Common Issues - CICS/ESA or CICS/TS
IBM TotalStorage ™
During the running of DWWAR (with CICS/ESA) or DWWLC (CICS/TS) receiving the message no forward recovery found on
log. This indicates that either no updates occurred to the data set or the options for forward recovery are not properly set.
RECOVERY(ALL) and FWDRECOVLOG(XX) must be set as shown. CICSVR will not process records generated by the
autojournaling options on the file definition.
Another problem we've seen is when changing the definition of a file to be recoverable. There can be unexpected
consequences, if the application has previously provided it's own backout processing and now CICS is provides that. Another
example is that issuing a write to data set from CICS, then setting the file to closed disabled status. If the file is defined as
recoverable the setting of the file will fail, because CICS will not allow the file to updated and closed in the same unit of work.
CICSVR Common Issues - CICS/ESA or CICS/TS
IBM TotalStorage ™
If you open a pmr for CICSVR this is going to be one of the first questions we ask you; "have you applied all the ptf's for
CICSVR ?". For CICSVR 2.3 there's around 40 PTF's available. Considering that this level of CICSVR provided support for
every release of CICS from CICS/MVS 2.1.2 to CICS/TS 1.3 and has been out for over six years thats not a lot. If you're
migrating to z/OS 1.2 please be sure and apply the PTF for apar PQ57358.
Almost every customer I talked with about CICSVR has been "less than enthusiastic" about the CICSVR 2.3 manuals. The
information is there, but it not easy to find. Take a look at the CICSVR 3.1 manuals available on the web. They have been
extensively reworked. Outside of the new features for CICSVR 3.1, they are a good reference for CICSVR 2.3, especially if
migrating from CICS/ESA to CICS/TS.
CICSVR Common Issues - CICS/ESA
IBM TotalStorage ™
Here's a common problem. By using the ISPF panels, all of the required logs and archive logs will be included in the forward
recovery JCL.
Here's a setup problem. It comes in two flavors. The first occurs when setting up a new CICS journal to be used for forward
recovery. It does need to be formatted by the CICS utility. The second is slightly different. If the journal entry in the JCT
specifies FORMAT=SMF, CICSVR will not be able to find the forward recovery records written to it.
CICSVR Common Issues - CICS/TS
IBM TotalStorage ™
One of the more common problems we see when customers are migrating to CICS/TS, is attempting to run program DWWAR
to archive CICS/TS logstreams. It won't do it, no matter what you try. Note that when migrating to CICS/TS the functions
provided by DWWAR to copy log records is handled by program DWWLC (LOGSTREAM COPY). But DWWAR is still executed
with different input to run LOGOFLOGS SCAN.
CICSVR Common Issues - CICS/TS
IBM TotalStorage ™
This is another of the more common errors we see. It happens when using Dasd-Only logstreams. As you recall, Dasd-Only
logstreams can only be accessed from one system at a time. This limitiation does not exist for coupling facility logstreams.
Recent Maintenance for CICSVR
IBM TotalStorage ™
Here's some recent maintenance for CICSVR. The first two deal with changes made to ISPF starting with z/OS 1.2.
The second item does cleanup in the case that a blank logoflogs has become registered in the RCDS. It also deals with the
case that a logoflogs is defined and registered on one system, logoflogs scan is run which picks up forward recovery
logstreams. If you deregister the logoflogs on that system and register it on another the first system will still attempt to connect
the logstream.
The last apar is not that new, but there are significant performance improvements when processing logstreams.
Bibliography
IBM TotalStorage ™
One of the best manuals for understanding how log streams work and what you need to know about them is the first manual
listed here. Be sure and read it. And also check out the new CICSVR manuals.