REPRO Parameters

ENVIRONMENT(subparameters)
describes whether the input or output file is a VSAM or nonVSAM file. If the environment parameter is present, or the INFILE is SYSIPT, then IDCAMS uses a DTF control block to access the file. Otherwise VSAM access (ACB) is used.

When you are copying from a nonVSAM file or a SAM ESDS file and the record format, record size, or block size has been changed using DTF access, then this parameter with the BLOCKSIZE and RECORDFORMAT subparameters is required.

Abbreviation: ENV
BLOCKSIZE(size)
specifies the block size for a nonVSAM file. This parameter is required. The block size you specify depends on the record format of the file:
RECORDFORMAT BLOCKSIZE
FIXUNB RECORDSIZE
FIXBLK RECORDSIZE x no. of records per block
VARUNB1 Maximum record size + 8
VARBLK1 At least maximum record size + 8
SPNUNB Full track size depends on a particular CKD device type.
SPNBLK Full track size depends on a particular CKD device type.
Note:
  1. If the output file (OUTFILE) is a VSE/VSAM file or a fixed- or undefined-record-format nonVSAM file, IDCAMS prefixes every logical record with a 4-byte record-length field (RL) that you must account for when you specify BLOCKSIZE (see Figure 1).

    In addition, you must add 4 bytes for the block-length field (BL).

For FIXBLK files, substitute the logical record length times the number of records per block. For ISAM FIXUNB files, substitute the logical record length plus the key length. If you are reloading a backup copy of a VSE/VSAM catalog, the block size must be a multiple of 516 plus 4.

The maximum block size is:

  1. 32,767 bytes per block for tape file and 32,768 bytes per block for sequential FBA disk files.
  2. At least 32,768 bytes per block for sequential CKD disk files up to full track size, but not more than 65,535 bytes per block (64K - 1). Full track size depends on a particular CKD device type.

The minimum block size is 18 bytes.

Figure 1. Format of Blocked and Unblocked Records
Format of Blocked and Unblocked Records
Abbreviation: BLKSZ
HINDEXDEVICE(devtype)
specifies, for an ISAM input file, the device type of the volume on which the highest index resides.

The possible device types that apply to an ISAM file are: 2314, 2319, 3330, and 3340.

Abbreviation: HDEV

Default: The device type of the highest index defaults to the device type of the volume on which the prime data records reside (see PRIMEDATADEVICE).

NOLABEL│STDLABEL
specifies the type of tape (unlabeled or EBCDIC standard-labeled) to be processed if PRIMEDATADEVICE specifies 2400.
NOLABEL
indicates that an unlabeled tape is to be processed.

For an input file, consider the following: Because the first record of an unlabeled tape may or may not be preceded by a tape mark (user's prerogative), you must take care to properly position the tape to the file you want to process. If a tape mark precedes the file, position the tape either immediately past or immediately before the tape mark. If no tape mark is present, position the tape immediately before the first data record. If the unlabeled tape was created by VSE/VSAM IDCAMS, there is no tape mark preceding the first record of the file.

For an output file, consider the following: You must properly position the tape to the file you want to process. For an output file, IDCAMS does not write a tape mark as the first record. Instead, a data record is written immediately, wherever the tape is positioned. If an output file is to begin somewhere in the middle of the tape, it is your responsibility to position the tape immediately past the ending tape mark of the preceding file. Use the MTC job control statement or command (described in Using Commands) to properly position the tape or to write a tape mark.

If VSE/Access Control-Logging and Reporting (IBM VSE/ACLR) is installed, REWIND must be specified for unlabeled tapes.

Abbreviation: NLBL
Restriction:
Although REPRO can create multivolume unlabeled output files, other AMS commands (including REPRO INFILE) can only process single volume unlabeled files.
STDLABEL
indicates EBCDIC standard-labeled tapes are to be processed.

Abbreviation: SLBL

Default: STDLABEL

Restriction: IDCAMS does not support ASCII files or nonstandard labels.

NOREWIND│REWIND│UNLOAD
specifies the tape positioning action for an OPEN, CLOSE, and EOV (end-of-volume) condition if PRIMEDATADEVICE specifies 2400.
Note: When you use REWIND or UNLOAD (especially with multifile volumes), any OPEN causes the tape to be positioned at load point. You must be sure that the file you want to process is really the first one (at load point) on the tape. Otherwise, specify the NOREWIND option and use the MTC job control statement (described in Using Commands), for example, to properly position the tape.
NOREWIND
specifies that rewind is never to be performed on OPEN, CLOSE, and EOV.

End-of-file considerations: For EBCDIC standard-labeled tapes, the tape is positioned between the two trailing tape marks. For unlabeled tapes, the tape is positioned following the single trailing tape mark.

Abbreviation: NREW

Default: NOREWIND

REWIND
specifies that tapes are to be rewound to load point but not unloaded on an OPEN, CLOSE, or EOV condition.

Abbreviation: REW

UNLOAD
specifies that tapes are to be rewound on an OPEN, and rewound and unloaded on an EOV and CLOSE condition.

Abbreviation: UNLD

PRIMEDATADEVICE(devtype)
specifies the device type of the volume on which the prime data records reside. The possible device types that apply to an ISAM file are 2314, 2319, 3330, and 3340.

You do not have to specify this parameter for a sequential file, unless the file resides on tape (in which case you specify 2400). The 2400 identifies all tape devices that DTFMT supports. You must specify SYS004 in the ASSGN statement for a tape input file; and you must specify SYS005 in the ASSGN statement for a tape output file. For more information on tape, see Tape Considerations for IDCAMS.

Abbreviation: PDEV

Default: 2314

RECORDFORMAT(format)
specifies the format of the records in a nonVSAM file. This parameter is required. For format, substitute one of the following values:
Value Meaning
FIXUNB F Fixed, unblocked
FIXBLK FB Fixed, blocked
VARUNB V Variable, unblocked
VARBLK VB Variable, blocked
SPNUNB S Variable spanned, unblocked
SPNBLK SB Variable spanned, blocked
UNDEF U Undefined

See the BLOCKSIZE and RECORDSIZE subparameters; their values are related to the RECORDFORMAT parameter.

VARBLK must be specified if you are reloading a backup copy of a VSE/VSAM catalog from a nonVSAM file, or if a catalog is to be unloaded into a sequential file.

Abbreviation: RECFM

RECORDSIZE(size)
specifies the length of a logical record for FIXBLK or FIXUNB nonVSAM files. For SPNBLK and SPNUNB nonVSAM files, this parameter is the maximum logical record size plus 4. For UNDEF nonVSAM files, this parameter is the maximum record size. This parameter is not necessary for VARUNB. If you are reloading a backup copy of a VSE/VSAM catalog, or if a catalog is to be unloaded into a sequential file, record size must be 516.

Abbreviation: RECSZ

Default: If RECORDSIZE is not specified, blocking is one record per block. Therefore, RECORDSIZE is equal to block size for files that are FIXUNB, FIXBLK, or UNDEF. RECORDSIZE is equal to block size minus four for files that are VARUNB, VARBLK, SPNUNB, or SPNBLK (see Figure 1).

ERRORMAX(count)
specifies the number of so-called acceptable errors. Processing is terminated when the number of such errors within the REPRO job step exceeds the value supplied by ERRORMAX. Examples of acceptable errors are:
  • Duplicate key (KSDS) or record (RRDS)
  • Record out of sequence
  • Invalid record length
  • Duplicate record in upgrade set

The count can be expressed in decimal (n), hexadecimal (X'n'), or binary form and must not exceed 4 bytes.

Abbreviation: EMAX

Default: 3

FROMADDRESS(address)│FROMKEY(key)│FROMNUMBER(number)│ SKIP(count)
specifies the first record to copy from the input file. For the files and keywords allowed in combination with these parameters, see Table 1.
Table 1. Files and Keywords with FROM-ADDRESS, -KEY, -NUMBER
Parameter Used with files To be used with
FROMADDRESS KSDS and ESDS TOADDRESS/COUNT
FROMKEY KSDS and ISAM TOKEY/COUNT
FROMNUMBER RRDS and VRDS TONUMBER/COUNT
SKIP ISAM,SAM,VSAM Any
FROMADDRESS(address)
specifies the RBA of the first record. It must be the beginning of a logical record. If you specify this parameter for a key-sequenced file, the records will be copied in physical sequential order instead of in key order. The address can be expressed in decimal (n), hexadecimal (X‘n'), or binary (B‘n') form.
FROMKEY(key)
specifies the key of the first record. It may be a full key or a generic key—that is, the high-order portion of a key. If you specify a generic key, copying begins at the first record whose key matches the portion of the key you specified. (You must not specify a key longer than that defined for the file. If you do, the file is not copied.) If the specified key is not found, listing begins with the next higher key. The key must be enclosed in single quotation marks if it contains commas, semicolons, blanks, parentheses, or slashes. A single quotation mark within a key must be coded as two single quotation marks if the key is enclosed in single quotation marks; it may contain up to 255 bytes, that is, 510 hexadecimal or 255 EBCDIC characters. If it is specified in hexadecimal, it must be preceded by X and be enclosed in single quotation marks.
FROMNUMBER(number)
specifies the relative-record number of the first record.
SKIP(count)
specifies the number of records you want to skip before beginning to copy records. For example, if you want copying to begin with the 500th record, you specify SKIP(499). The count can be expressed in decimal (n), hexadecimal (X‘n'), or binary (B‘n') form and be no longer than one fullword (4 bytes or 32 bits).

Abbreviations: FKEY, FNUM, and FADDR

Default: If nothing is specified, the copying begins with the first record.

Restrictions: Cannot be used when input file is a catalog.

INFILE(dname)
describes the input file. If the file is defined in a user catalog which is not the job catalog, you must explicitly name the user catalog by specifying the CAT parameter in the file's DLBL job control statement. (The user catalog's DLBL statement does not require an associated EXTENT statement.) When using REPRO to load an ISAM file to be run under the ISAM Interface Program (IIP), the INFILE must be in ISAM format. Do not use REPRO to copy the ISAM file onto tape before loading it because copying it onto tape makes it a SAM file.

dname - specifies the file name of the DLBL (an associated EXTENT statement is required only if the input file is a nonVSAM file) or TLBL job control statement that identifies the file to be copied. The input file can be on SYSIPT, in which case dname has to be specified as SYSIPT. You can process a base cluster in alternate key sequence by specifying a path name as file ID the DLBL statement. This is a required parameter.

If an unlabeled tape is used (NOLABEL option), a TLBL statement is not required. However, because dname is a required positional parameter, a dummy file name of your choosing must be specified.

password - the read or higher-level password of the password-protected file to be copied. If a catalog is to be copied, the catalog's master password is required. For a path, it is the read or higher-level password of the path.

Abbreviation: IFILE

OUTFILE(dname)
dname - specifies the file name of the DLBL (an associated EXTENT statement is required only if the output file is a sequential file) or TLBL job control statement that identifies the output file. ISAM files cannot be specified as output files. This is a required parameter. For VSE/VSAM files, the file ID may be that of a path. A master catalog must be copied to a sequential file.

If an unlabeled tape is used (NOLABEL option), a TLBL statement is not required. However, because dname is a required positional parameter, a dummy (fictitious) file name of your choosing must be specified.

If the file is defined in a user catalog which is not the job catalog, you must explicitly name the user catalog by specifying the CAT parameter in the file's DLBL job control statement. (The user catalog's DLBL statement does not require an associated EXTENT statement.)

password - the update or higher-level password of the VSE/VSAM file used for output if it is password-protected. If a catalog is to be reloaded, the catalog's master password is required; for a path, it is the update or higher-level password of the path.

Abbreviation: OFILE

REPLACE│NOREPLACE
specifies whether an input record which has a key (key-sequenced file) or record number (relative-record file) identical to the key or record number of a record in the output file is to replace that record.
If you specify NOREPLACE, VSE/VSAM issues a warning message that identifies the key or record number of the duplicate record; processing continues with the next record. Do not specify REPLACE if the output file is:
  • An entry-sequenced or sequential file
  • A path over an alternate index
  • A base cluster with a unique-key alternate index in the upgrade set
  • An empty file to be loaded

Abbreviations: REP and NREP

Default: NOREPLACE

REUSE│NOREUSE
specifies whether the output file will be opened with the reset option (that is, with its “high-used RBA” set to 0). If REUSE is specified and the file is not empty and is defined as nonreusable (NOREUSE), REPRO terminates. If DISP=OLD is specified in the DLBL statement, REUSE does not reset the high-used RBA because the DLBL specification overrides the REPRO command.

Abbreviations: RUS and NRUS

Default: NOREUSE

TOADDRESS(address)│TOKEY(key)│TONUMBER(number)│COUNT(count)
specifies the last record to copy in the file. The last record must follow the first record. For the files and keywords allowed in combination with these parameters, see Table 2.
Table 2. Files and Keywords with TO-ADDRESS, -KEY, -NUMBER, COUNT
Parameter Can be used with To be used with
COUNT ISAM,SAM,VSAM Any
TOADDRESS KSDS and ESDS FROMADDRESS/SKIP
TOKEY KSDS and ISAM FROMKEY/SKIP
TONUMBER RRDS and VRDS FROMNUMBER/SKIP
TOADDRESS(address)
specifies the RBA of the last record. Unlike FROMADDRESS, the RBA does not need to be the beginning of a logical record. The entire record containing the specified RBA is printed. If you specify this parameter for a key-sequenced file, the copying will be in physical sequential order instead of in key order. The address can be expressed in decimal (n), hexadecimal (X‘n'), or binary (B‘n') form.
TOKEY(key)
specifies the key of the last record. It may be a full key or a generic key - that is, the high-order portion of a key. If you specify a generic key, copying stops after the last record is copied whose key matches the portion of the key you specified. (You must not specify a key longer than that defined for the file. If you do, the copying is not performed.) If the specified key is not found, copying ends with the next lower key. The key must be enclosed in single quotation marks if it contains commas, semicolons, blanks, parentheses, or slashes. A single quotation mark within a key must be coded as two single quotation marks if the key is enclosed in single quotation marks; the key may contain up to 255 bytes, that is, 510 hexadecimal or 255 EBCDIC characters. If it is specified in hexadecimal, it must be preceded by X and be enclosed in single quotation marks.
TONUMBER(number)
specifies the relative-record number of the last record.
COUNT(count)
specifies the number of records to be copied. The count can be expressed in decimal (n), hexadecimal (X‘n'), or binary form and be no longer than one fullword (4 bytes or 32 bits).

Abbreviations: TADDR and TNUM

Default: If nothing is specified, the copying ends with the last record.

Restrictions: Cannot be used when input file is a catalog.