A successful READ statement must precede any REWRITE statement for the
following file types:
- Files with sequential organization
- Files using squential access mode
- Files with indexed organization and with duplicate keys.
Such a READ statement must not include the NO LOCK phrase. If an attempt
is made to replace a record that has been selected by a READ statement, and
that record was not locked when it was read, the REWRITE statement will be
unsuccessful.