%REPRO Extension

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)
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

For example:

//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)