Update Register [ HP Transact Reference Manual ] MPE/iX 5.0 Documentation
HP Transact Reference Manual
Update Register
The update register holds pairs of update specifications. Each pair
consists of a data item name and a new value for that data item. These
name/value pairs can be used to update records in an MPE or KSAM file or
in a data set. The update register is only used with the REPLACE verb to
update one or more records. Entries in the update register can be
cleared or deleted selectively by using the RESET verb with the UPDATE
option.
The update register operates on the data retrieved with data management
verbs. The retrieved data generally satisfies other criteria set up in
the key register or in the match register. The update register contains
new values for data items in the selected entries. When REPLACE
executes, it retrieves each selected entry and places its current values
in the data register. It then replaces any values in the data register
that have a corresponding value in the update register. If a data item
is not named in the update register, its value in the data register is
not changed. REPLACE then writes the updated entry back to the file or
data set.
For example, suppose you want to change the credit rating for all
customers whose current rating is "A" to "A1". You can set up the match
register to contain the criterion CREDIT = "A", then set up the update
register with the new value for CREDIT.
NOTE You do not use the update register with the UPDATE verb nor would
you normally use it with REPLACE to update multiple entries with
different values. The update register is particularly useful for
making the same change to multiple entries.
MPE/iX 5.0 Documentation