Enscribe Programmer's Guide
IF < THEN ... ! error
ELSE
BEGIN ! process the record
IF cust^rec.cust^limit >= 1000.00F
AND cust^rec.cust^limit < 2000.00F THEN
BEGIN
cust^rec.cust^limit := 2000.00F;
CALL WRITEUPDATE
(cust^filenum, cust^rec, $LEN(cust^rec) );
IF < THEN ... ! error
END;
END;
END; ! read loop
This illustration shows the contents of the customer file after all of the applicable records have
been updated:
limit
ADAMS
BROWN, A
BROWN, B
EVANS
HARTLEY
JONES
KOTTER
RICHARDS
ROGERS
SANFORD
SMITH
MIAMI, FL
REEDLEY, CA
BOSTON, MA
BUTTE, MT
CHICAGO, IL
DALLAS, TX
NEW YORK, NY
MINNEAPOLIS, MN
BOISE, ID
LOS ANGELES, CA
DAYTON, OH
SO
WE
EA
WE
NO
SO
EA
NO
WE
WE
NO
0000.00
0256.95
0301.00
0010.00
0463.29
1234.56
0089.00
0000.00
1024.00
0301.00
0010.00
0500.00
0300.00
2000.00
0100.00
0500.00
2000.00
0500.00
0500.00
2000.00
2000.00
0500.00
Changed Fields
HEATHCLIFF PORTLAND, OR WE 0000.00 0500.00
Example 11: Deleting a Record
This example shows how to select and delete the data record whose primary-key value is EVANS.
This illustration shows the contents of the applicable portion of the customer file before the
deletion:
BROWN, B
EVANS
HARTLEY
BOSTON, MA
BUTTE, MT
CHICAGO, IL
EA
WE
NO
0301.00
0010.00
0433.29
2000.00
0100.00
0500.00
98 Key-Sequenced Files