z/OS DFSMS Using Data Sets
Previous topic | Next topic | Contents | Contact z/OS | Library | PDF


Using REPRO to Copy a VSAM Data Set

z/OS DFSMS Using Data Sets
SC23-6855-00

The REPRO command lets you retrieve records from a sequential or VSAM data set and store them in VSAM format in a key-sequenced, entry-sequenced, relative-record, or a sequential data set. The REPRO command is also used to load data from one linear data set into another linear data set.

When records are to be stored in key sequence, index entries are created and loaded into an index component as data control intervals and control areas are filled. Free space is left as indicated in the cluster definition in the catalog.

VSAM data sets must be cataloged. Sequential data sets need not be cataloged. Sequential data sets that are system managed must be cataloged.

If a sequential data set is not cataloged, include the appropriate volume and unit parameters on your DD statement. Also, supply a minimum set of DCB parameters when the input data set is sequential, and/or the output data set is sequential. The following table shows the key parameters:

Parameters User Can Supply Default if Not Supplied
RECFM F, FB, V, VB, VS, VBS U
BLKSIZE Block size Determined by system if RECFM is not U and LRECL is specified
LRECL Logical record length BLKSIZE for F or FB BLKSIZE-4 for V, VB, VS, VBS

The DCB parameters RECFM, BLKSIZE, and LRECL can be supplied using the DSCB or header label of a standard labeled tape, or by the DD statement. The system can determine the optimum block size.

If you use REPRO to copy to a sequential data set, you do not need to supply a block size because the system determines the block size when it opens the data set. You can optionally supply a BLKSIZE value using JCL or when you define the output data set. If you want to prevent the system from choosing a block size that is over a certain value, you can code BLKSZLIM on the DD statement.

If you are loading a VSAM data set into a sequential data set, you must remember that the 3-byte VSAM record definition field (RDF) is not included in the VSAM record length. When REPRO attempts to copy a VSAM record whose length is more than the non-VSAM LRECL-4, a recoverable error occurs and the record is not copied. (Each non-VSAM format-V record has a four-byte prefix that is included in the length. Thus, the length of each VSAM variable-length record is four bytes less than the length of the non-VSAM record.)

Access method services does not support records greater than 32 760 bytes for non-VSAM data sets (LRECL=X is not supported). If the logical record length of a non-VSAM input data set is greater than 32 760 bytes, or if a VSAM data set defined with a record length greater than 32 760 is to be copied to a sequential data set, the REPRO command terminates with an error message.

The REPRO operation is terminated if:
  • One physical I/O error is found while writing to the output data set
  • A total of four errors is found in any combination of the following:
    • Logical error while writing to the output data set
    • Logical error while reading the input data set
    • Physical error while reading the input data set

Related reading: For information about physical and logical errors, see z/OS DFSMS Macro Instructions for Data Sets.

Go to the previous page Go to the next page




Copyright IBM Corporation 1990, 2014