When VSAM spheres are updated by CICS® applications and batch applications, log records are written to MVS™ log streams to record this activity.
If a failure occurs, CICS VR uses these log records to forward recover the VSAM spheres. You must create a copy of these log records so that CICS VR can also perform forward recovery at the remote recovery site.
The CICS VR log stream copy utility copies log records from your MVS log streams to a sequential access method (SAM) data set. You cannot use IDCAMS or CICS VR archive to copy an MVS log stream. You can create up to nine sequential data set copies from an MVS log stream in one LOGSTREAMCOPY job, but CICS VR only records the data set name allocated to the DWWCOPY1 ddname in the RCDS. Therefore, be sure to send the data set allocated to the DWWCOPY1 ddname to the remote recovery site. Then, use the CICS VR panel interface to create and submit a recovery job for the VSAM spheres at the remote recovery site.
Use a production planning system, such as Tivoli® Workload Scheduler for z/OS®, to submit log stream copy jobs and send the SAM log stream copy data sets to your remote recovery site at regularly scheduled times.
The sample JCL to run the CICS VR log stream copy utility below, shows a sample LOGSTREAMCOPY job that makes one copy of the specified MVS log stream.
//JOB1 JOB ACCOUNTING INFORMATION,REGION=0M
//COMMAND EXEC PGM=DWWLC 1
//STEPLIB DD DSN=DWW.SDWWLOAD,DISP=SHR 2
// DD DSN=DWW.SDWWLENU,DISP=SHR
//DWWLOAD DD DSN=DWW.OPTIONAL.LOAD,DISP=SHR 3
//DWWCOPY1 DD DSN=USER1.DWWCOPYL, 4
// UNIT=3590,VOL=SER=TAPE04,
// LABEL=(1,SL),DISP=(NEW,KEEP)
//DWWCON1 DD DSN=DWW.DWWCON1,DISP=SHR 5
//DWWCON2 DD DSN=DWW.DWWCON2,DISP=SHR
//DWWCON3 DD DSN=DWW.DWWCON3,DISP=SHR
//DWWMSG DD SYSOUT=* 6
//DWWPRINT DD SYSOUT=* 7
//DWWIN DD * 8
LOGSTREAMCOPY - 9
NAME(CICSVR.MVSLOG) -
SELECT(CICSVR) -
COPIES(1) -
MOD
/*
//
The DCB parameters for this data set are RECFM=FBA and LRECL=133. The block size can be provided on the DWWMSG DD statement and must be a multiple of 133. The default is 27930.
The DCB parameters for this data set are RECFM=FBA and LRECL=133. The block size can be provided on the DWWPRINT DD statement and must be a multiple of 133. The default is 27930.
Once set up, this job can be run over and over again to update the copy of the log stream.
The Log stream copy report below, shows the log stream copy report, followed by descriptions of the fields in the report.
CICSVR - MVS LOG STREAM COPY UTILITY DATE : 01/06/08 TIME : 12:51:13 PAGE : 1
STATISTICS FROM THE MVS LOG STREAM COPY UTILITY
===============================================
MVS LOG STREAM NAME : CICSVR1.MVSLOG
FIRST TIME GMT : 01.159 12:39:09
LAST TIME GMT : 01.159 12:39:44
FIRST TIME LOCAL : 01.159 13:39:09
LAST TIME LOCAL : 01.159 13:39:44
FIRST BLOCK NUMBER : 5965196
LAST BLOCK NUMBER : 11890088
NUMBER OF BLOCKS READ : 148
NUMBER OF CICSVR BLOCKS: 148
NUMBER OF BLOCKS COPIED: 148
TYPE OF COPY : ALL
OUTPUT LOG NAME(S) : CICSVR1.MVSLOG.COPY
PERFORMED ACTIONS : COPY
CICS AND CICSVR specifies records produced by CICS and CICS VR batch logging were copied from the MVS log stream. ALL specifies all records were copied from the MVS log stream.
On rare occasions, you might want to make a copy of a portion of a log stream. Use the STARTTIME and STOPTIME keywords, the STARTBLKID and STOPBLKID keywords, or the STARTTOD and STOPTOD keywords.
With the STARTTIME and STOPTIME keywords, CICS VR copies records from the time specified on the STARTTIME keyword up to the time specified on the STOPTIME keyword shows a sample LOGSTREAMCOPY command with STARTTIME and STOPTIME:
LOGSTREAMCOPY NAME(CICSVR1.MVSLOG) -
SELECT(ALL) -
COPIES(3) -
STARTTIME(96159/07:30:00,GMT) -
STOPTIME(96249/07:30:00,GMT) -
MOD
The LOGSTREAMCOPY command above tells CICS VR to make three copies of the MVS log stream. These copies are made to the data sets that are specified on the ddnames DWWCOPY1, DWWCOPY2, and DWWCOPY3. Records are copied to the end of the data sets that are specified in the DWWCOPYn ddnames. All records are copied from the MVS log stream between the start and the stop time specified in the command.
If you need to specify the start and the stop time in a more granular format, you can use the STARTTOD and STOPTOD keywords in place of STARTTIME and STOPTIME.
Only use this method if you need a one-time-copy for test data. Do not use it for copying consecutive portions of the log because the time values are not precise enough to prevent gaps in the log.
With the STARTBLKID and STOPBLKID keywords, CICS VR copies records from the STARTBLKID to the STOPBLKID. Use the CICS DFHJUP program to find out the MVS block identifier you can use as the STARTBLKID and the STOPBLKID. This method is not easy to use and is not recommended. If you require more information on DFHJUP, see CICS Operations and Utilities Guide.
The DELETE keyword enables you to avoid log stream overloading by deleting the log stream blocks after they have been successfully copied. The LOGSTREAMCOPY command tells CICS VR to make one copy of the specified MVS log stream and delete copied blocks.
Log stream block deletion is performed only if CICS VR permits it, see LOGSTREAMCOPY: Copy an MVS log stream.
LOGSTREAMCOPY NAME(CICSVR1.MVSLOG) -
SELECT(ALL) -
COPIES(1) -
STOPTIME(96249/07:30:00,GMT) -
DELETE -
MOD
The SETBRCUR, REPBRCUR and MOVBRCUR keywords provide another method for automatic continuous log stream copying, as you do not need to include date and time information in your log stream copy job. Using these keywords ensures that the beginning and end of your copy are precisely defined, and the copy is repeatable.
Note that log streams to be processed in this way must be defined as AUTODELETE(NO) RETPD(0), to avoid unexpected loss of data.
You must not run more than one job per log stream using a SETBRCUR, REPBRCUR or MOVBRCUR keyword with the same RCDS at any one time in your SYSPLEX. If you run more than one such job simultaneously, they update the same cursor in the CICS VR RCDS, and then your copy would not be repeatable. You can run jobs that use only non-cursor related keywords of the LOGSTREAMCOPY command with the same RCDS at the same time as a job using one of the cursor-related keywords (SETBRCUR, REPBRCUR or MOVBRCUR), as the other log stream copying keywords do not affect the position of the cursors.
LOGSTREAMCOPY NAME(CICSVR1.MVSLOG) -
SELECT(ALL) -
SETBRCUR
LOGSTREAMCOPY NAME(CICSVR1.MVSLOG) -
SELECT(ALL) -
REPBRCUR
LOGSTREAMCOPY NAME(CICSVR1.MVSLOG) -
SELECT(ALL) -
MOVBRCUR