|
|
The updating commands, UPDATE ADD, UPDATE DELETE, and UPDATE
REPLACE, change the data in the data base. UPDATE DELETE and UPDATE
REPLACE operate on the entries selected by the last FIND, FIND ALL,
or SUBSET command following a FIND or FIND ALL command. UPDATE ADD
does not require a previous retrieval command.
You can modify your data base in three ways:
Add data entries to a data set.
Delete data entries from a data set.
Change the value of data items not defined as search
or sort items of the data set.
You must have specified an access mode of 1, 2, 3, or 4 to
use the updating commands. If you opened the data base with another
mode, you can use the MODE=, DEFINE, DATA-BASE=, or MULTIDB command
to specify another mode. If you opened the data base with mode 2,
you can only use UPDATE REPLACE. If you specify mode 1, 3, or 4,
you can use any of the updating commands. However, if the data base
administrator has disallowed data base modification, no one can
modify the data base, regardless of the mode specified.
>DEFINE
DATA-BASE = >>ORDERS
PASSWORD = >>CLERK
MODE = >>2
DATA-SETS = >>CUSTOMER
PROC-ENTITY = >><Return>
OUTPUT = TERM
OUTPUT = >><Return>
>FIND LAST-NAME IS MARTENSEN
USING SERIAL READ
1 ENTRIES QUALIFIED
>UPDATE REPLACE,STREET-ADDRESS="2451 CHASEN ROAD";END
>
An updating command can be stored as a procedure in a Proc-file
for repeated use without re-entering the command. Updating procedures
can be created which prompt you for the values to be added, deleted,
or replaced when the procedure is executed. This allows you to modify
the data with different values for the same data item(s) each time
the procedure is executed.
|