CHANGE
Change a (normally non-changeable) key in an indexed database.

Format
 Change [oldexpr] to newexpr in DATABASE [/Qualifiers ...]
 oldexprThe key to change. If omitted, the key of the current record is changed.
 newexprThe new key
 If the current record for this database has been modified, it is written back to the record stream before any other record operation takes place. If an error occurs during this write-back operation (e.g. duplicate key, record not locked for write, etc.) an error is generated for this statement. The record remains current, but is now considered to be unchanged so that the next operation will not attempt another write-back.
 NOTE
 If the datafile is in RMS format, this operation attempts to insert a new record with the new key value. This operation will fail if there is another key defined that does not allow duplicates.

Qualifiers
/Fail=LABELLabel to which to branch if the statement fails.
If LABEL is %EXIT, exit the routine or loop.
If in a loop, and LABEL is %CONTINUE, continue the loop. If not in a loop, and LABEL is %CONTINUE, an error message displays.
 /Succeed=LABELLabel to which to branch if the statement succeeds.
If LABEL is %EXIT, exit the routine or loop. If in a loop, and LABEL is %CONTINUE, continue the loop. If not in a loop, and LABEL is %CONTINUE, an error message displays.
 /NofailDo not signal an error. Instead, set the
internal variable %FAIL. There are several reasons why a CHANGE may fail. For example, the old key may not exist, the new key may already exist, or the key may be a non-changeable key in the RMS datafile.
 /Key=DATABASE(#expr)
/Key=DATABASE(#FIELD)
The required key field. This qualifier can be omitted if the operation is on the primary key.

Example
 Change "A" & key to 'B' & key in DB /Key=DB(KEY2)
 ! Get and change a key.
 Change to 'B' & key in DB /Key=DB(KEY1)
 ! Change the current record key