Previous Topic: RECEIVE Statement

Next Topic: RESET Statement

REPRO Statement

The REPRO statement copies data between VSAM files and sequential files. You can use REPRO statements in an LDMAMS job to back up files or to restore files from backup copies.

Syntax

REPRO INFILE(inddname) OUTFILE(outddname)
         [[FROMKEY(key)] [REPLACE] [REUSE] [TOKEY(key)]]

Operand

Explanation

FROMKEY

Identifies the first input record. Specify a full or partial record key. If the key contains special characters (such as blanks or punctuation characters), enclose it in quotes.

Default Value: CA‑L‑Serv starts with the first record in the file.

INFILE

Identifies the source file. For a backup operation, this is the VSAM file that you are backing up. For a restore operation, this is the sequential file that contains the backup copy you want to use.

OUTFILE

Identifies the target file. For a backup operation, this is the sequential file that will contain the backup copy. For a restore operation, this is the VSAM file that you are restoring.

REPLACE

Replaces existing records in the target file with records from the source file. If CA‑L‑Serv finds a duplicate record, it uses the last copy of the record. Omit this parameter on backup operations.

Default Value: CA‑L‑Serv skips duplicate records.

REUSE

Deletes the contents of the target file before adding records to it. Omit this parameter on backup operations. A file can be reused only if it was defined with the REUSE option of the DEFINE CLUSTER control statement using the IDCAMS utility.

TOKEY

Identifies the last input record. Specify a full or partial record key. If the key contains special characters (such as blanks or punctuation characters), enclose it in quotes.

Default Value: CA‑L‑Serv copies through the last record in the file.

Notes:

Example