|
Entire document Available as PDF |
Table of Contents
The CFILE utility, which was used to copy sequential and ISAM data sets, is not supported. Neither are ISAM data sets. All users with ISAM data sets should convert them to VSAM.
This document describes how to use IDCAMS/REPRO to copy a data set. It is intended as a replacement for CFILE and is not intended as complete documentation on VSAM data sets or the IDCAMS utility.
For detailed information on IDCAMS and using VSAM data sets, see the documentation section below.
IDCAMS is an IBM utility that allows you to create and manipulate VSAM data sets. It has several commands. You can use the REPRO command of IDCAMS to copy VSAM and non-VSAM data sets, VSAM
clusters, and alternate indexes.
You cannot use REPRO to copy an entire partitioned data set (PDS) because REPRO does not copy the information in the directories. You can, however, use REPRO to copy individual members.
The IBM IEBCOPY utility should be used to copy an entire PDS.
The general form of the REPRO command is as follows:
REPROparameterparameter-parameter-parameter
Parameters may be separated by either commas or blanks. You can continue the REPRO statement by coding a hyphen (-) as the last character of a line. The command and parameters may be typed anywhere betweeen columns 2-72.
Figure 18 shows the JCL for a basic job setup to access IDCAMS. The INFILE parameter names the DD statement for the data set that is to be copied. The OUTFILE parameter
names the DD statement describing the output or target data set. You would replace "indd" and "outdd" with DD names of your own choosing.
Figure 17. JCL to Use IDCAMS and the REPRO
Command
//COPY JOB ,'your name',CLASS=class,TIME=(mm,ss),LINES=lines/*ROUTE PRINTnode.location// EXEC PGM=IDCAMS //SYSPRINT DD SYSOUT=A //indd DD DSN=... (describes the input data set)//outdd DD DSN=... (describes the output data set)//SYSIN DD * REPRO - INFILE(indd) - OUTFILE(outdd) /*
Figure 19 shows how to use REPRO to copy a VSAM data set to a sequential data set. You could use this to make a sequential backup copy of your VSAM data set. In this example, assume that your VSAM data set has variable-length
records. The maximum record size is 100 bytes and you have embedded keys. When you specify your LRECL and BLKSIZE for your output data set, make sure they are at least 4 bytes longer than the longest record in
your VSAM data set.
Figure 18. Using REPRO to Copy a VSAM Data Set to A Sequential Data Set
//COPY JOB ,'your name',CLASS=class,TIME=(mm,ss),LINES=lines/*ROUTE PRINTnode.location// EXEC PGM=IDCAMS //SYSPRINT DD SYSOUT=A //VSAM DD DSN=UF.userid.VSAM.DATASET,DISP=OLD //SEQ DD DSN=UF.userid.SEQ.BACKUP,UNIT=SYSDA, // SPACE=(TRK,(10,10)), // DISP=(NEW,CATLG), // DCB=(LRECL=104,BLKSIZE=1004,RECFM=VB) //SYSIN DD * REPRO - INFILE(VSAM) - OUTFILE(SEQ) /*
Figure 20 shows an example of using REPRO to make a VSAM backup of your original VSAM data set. This example assumes that you have already created the backup data set (using IDCAMS). The OLD DD name defines your
original VSAM data set. The NEW DD name defines the output data set.
Figure 19. Using REPRO to Backup a VSAM Data Set
//COPY JOB ,'your name',CLASS=class,TIME=(mm,ss),LINES=lines/*ROUTE PRINTnode.location// EXEC PGM=IDCAMS //SYSPRINT DD SYSOUT=A //OLD DD DSN=UF.userid.VSAM.DATASET,DISP=OLD //NEW DD DSN=UF.userid.VSAM.BACKUP,DISP=OLD //SYSIN DD * REPRO - INFILE(OLD) - OUTFILE(NEW) /*
Suppose you want only to make a backup of part of your data set. You can use the SKIP(andn) COUNT(keywords on them) REPRO command
to delimit the records to be copied. The following form of the REPRO command would copy the input data set beginning with the 100th record and copy 500 records.
REPRO - INFILE(VSAM) - OUTFILE(SEQ) - SKIP(99) - COUNT(500)
See the IBM manual DFSMS/MVS Access Method Services for the Integrated Catalog Facility for detailed information about using IDCAMS. It also contains descriptions of other REPRO keywords
not discussed here.
An excellent, but brief, overview of VSAM data sets and the IDCAMS utility, is in the latest version of the JCL text by Gary DeWard Brown.
See the CNS General Information: CNS Software and Software References manual (D0009) for information on how to obtain these manuals.