Technical data

Figure 6–8 Results of an ERASE Record-Name (with Both OPTIONAL and
FIXED Retention Classes)
SET_C
SET_B
B2
B3B1
OWNER
A1 A4
A3
SET_A
ERASE
A2
OWNER
A1 A4SET_A
AFTER ERASE <record−name>PRIOR TO ERASE <record−name>
A3
C1
C2 C1 C2
ZK−1516−GE
Remember, records removed from a set but not deleted from the database can still
be accessed.
6.10 Freeing Currency Indicators
Use the FREE database-key-id statement to release the currency indicators
for realms, records, sets, or the run unit. You use the FREE statement: ( 1 ) to
establish a known currency condition before executing a program routine, and ( 2 )
to release record locks.
6.10.1 Establishing a Known Currency Condition
Establishing a known currency condition is helpful in many situations—for
example, if you have a program that performs a customer analysis and prints
three reports. The first report prints all customers with a credit rating greater
than $1,000, the second report prints all customers with a credit rating greater
than $5,000, and the third report prints all customers with a credit rating greater
than $10,000. Because some customers will appear on more than one report, you
want each report routine to start its customer analysis with the first customer in
the database.
By using the FREE CURRENT statement at the end of a report routine, as shown
in Example 6–4, you null the currency and allow the next print routine to start
its analysis at the first customer.
6–12 DML Programming—Tips and Techniques