The %REPRO extension can be specified on the PARM keyword of the EXEC statement invoking IDCAMS, and on the PARM command. The syntax is:
%REPRO(VSAM | VSAMLAX | OSCOPY | OSCOPYLAX)
%REPRO(VSAM) provides the normal REPRO host compatible behaviour and is the default. In this case, for example, out of sequence records, when REPROing to a KSDS, will be flagged as an error.
%REPRO(VSAMLAX) provides the Micro Focus relaxed REPRO behavior. In this case, for example, out of sequence records, when REPROing to a KSDS, will be indicated with an information message.
%REPRO(OSCOPY) attempts to use the operating system’s “file copy” facility to copy the underlying PC files. %REPRO(OSCOPY) is faster than %REPRO(VSAM), and is performed only if the data set attributes of the input data set match those of the output data set as indicated in the table below. An informational message is always issued indicating that the operation that took place.
%REPRO(OSCOPYLAX) is the same as %REPRO(OSCOPY), except that it still uses the operating system’s “file copy” facility to copy the underlying PC files even if a subset of attributes do not match. The table below indicates which attributes must match for each command option. If the attributes at the bottom of the table (CHARSET, EXTENDED-TYPE, REUSE/NOREUSE, UNIQUEKEY/NONUNIQUEKEY) do not match, a message is issued but the system still proceeds with the operating system's “file copy”.
Attribute | Must match for |
---|---|
RECFM | OSCOPY and OSCOPYLAX |
DSORG | OSCOPY and OSCOPYLAX |
VSAM-KEY-OFFSET | OSCOPY and OSCOPYLAX |
VSAM-KEY-LENGTH | OSCOPY and OSCOPYLAX |
LRECL | OSCOPY and OSCOPYLAX |
LRECL-MAX (system managed) | OSCOPY and OSCOPYLAX |
LRECL-MIN (system managed) | OSCOPY and OSCOPYLAX |
CHARSET (EBCDIC or ASCII) | OSCOPY |
EXTENDED-TYPE (system managed. Indicates base cluster, aix, etc.) | OSCOPY |
REUSE/NOREUSE | OSCOPY |
UNIQUEKEY/NONUNIQUEKEY (for AIXs and PATHs) | OSCOPY |
//STEPAMS EXEC PGM=IDCAMS,PARM=';MFE:%REPRO(OSCOPY)' //SYSPRINT DD SYSOUT=* //VSAMDATA DD * AA BBB //SYSIN DD * PARM ;MFE: %REPRO(VSAM) /* Next REPRO will use normal REPRO */ REPRO IFILE (VSAMDATA) - ODS (MFIDSA.REPROOS.KSDS1) PARM ;MFE: %REPRO(OSCOPY) /* All REPRO(s), until another PARM command specifies – otherwise, will use OS copy if possible */ REPRO IDS (MFIDSA.REPROOS.KSDS1) - ODS (MFIDSA.REPROOS.KSDS2)
The extension comes after a semicolon, so that the mainframe will see it as a comment. However, if the extension is the only option to the PARM command, the mainframe reports an error. To prevent this, you must code at least one option in addition to the extension. For example, rather than coding exactly as in the example above, you could code:
PARM='MAR(2,72);MFE: %REPRO(OSCOPY)'
or equivalently:
PARM MAR(2,72);MFE: %REPRO(OSCOPY)