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.
REPRO INFILE(inddname) OUTFILE(outddname) [[FROMKEY(key)] [REPLACE] [REUSE] [TOKEY(key)]]
Parameters
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: CA‑L‑Serv starts with the first record in the file.
Source file. For a backup operation, this file is the VSAM file that you are backing up. For a restore operation, this file is the sequential file that contains the backup copy you want to use.
Target file. For a backup operation, this file is the sequential file that contains the backup copy. For a restore operation, this file is the VSAM file that you are restoring.
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: CA‑L‑Serv skips duplicate records.
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.
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: CA‑L‑Serv copies through the last record in the file.
Notes:
Example
To back up FILE1 and store its contents in BCKFILE1, specify this statement as input to the LDMAMS job:
REPRO INFILE(FILE1) OUTFILE(BCKFILE1)
To replace the contents of FILE2 with the contents of BCKFILE2, specify this statement as input to the LDMAMS job:
REPRO INFILE(BCKFILE2) OUTFILE(FILE2) REPLACE REUSE
Copyright © 2014 CA Technologies.
All rights reserved.
|
|