REP control statement

This statement changes data in the physical record that is defined by the previous KEY, RBA, CNV, or NUM control statement.

Important:
  • Data in the REP statement replaces data at the record location that is given in the offset parameter. Always use VER to verify the data before you use REP to change the data. A message that shows the replaced data is generated for each successful REP operation.
  • REP and VER are interdependent in the performance of many tasks. Therefore, be sure to read all rules that pertain to the use of VER before you attempt to use REP control statements.
  • Make sure that your corresponding VER and REP statements contain the same offset values. Otherwise, you might modify your VSAM data set incorrectly.
  • When there are several VER and REP operations for one record, code all VER statements before coding the REP statements. (If one VER reject occurs, the program ignores all the REP operations for that KEY, RBA, CNV, or NUM control statement. Otherwise, the wrong data might be replaced).
REP offset data
offset
The hexadecimal displacement of data that is being replaced in the data record. The displacement does not have to address a fullword boundary. It must be specified with an even number of hexadecimal digits (for example, 0D, 021C, 014682).

If the offset is greater than the record length, the REP operation does not occur.

data
Defines the bytes of data that is inserted at the specified location. The data bytes must be specified with an even number of hexadecimal digits (for example, F2C04682).

If all data does not fit on one 80-byte REP statement, use another REP statement.