Getting Started with TRANSACT (32247-90007)

Chapter 2 43
Using Character Mode I/O
Adding Data to a Dataset
become spaces or zero, depending on whether it was an alphanumeric or
numeric item.
10 UPDATE moves the record into the customer set.
Figure 2-9. Interactive Updating of a Dataset
Note that a valid cust-no has to be entered before the program will continue.
In the above example, we corrected the zipcode, but left the other items as they were.
When we enter the same customer number a second time, Transact displays the updated
record, thereby giving us an easy way to verify the data just entered--or to further change
the record if necessary.
In the next program, we take advantage of the fact that Transact has to retrieve the
customer record when it verifies cust-no. In fact, this feature actually makes our program
less complicated and eliminates an extra database access.
CUST-NO> 305
*ERROR: NO ENTRY FOUND (IMAGE 17,9,CUSTOMER)
CUST-NO> 301
CUST-NO: NAME: STREET-ADDR: CITY-STATE: ZIPCODE:
301 Joe's Bike Shop 1243 East Julian San Jose Ca.
NAME>
STREET-ADDR>
CITY-STATE>
ZIPCODE> 12345
CUST-NO> 301
CUST-NO: NAME: STREET-ADDR: CITY-STATE: ZIPCODE:
301 Joe's Bike Shop 1243 East Julian San Jose 12345
NAME> ]
EXIT/RESTART(E/R)?>
END OF PROGRAM
: