Getting Started with TRANSACT (32247-90007)

48 Chapter2
Using Character Mode I/O
Adding Data to a Dataset
Figure 2-14. Program to Delete Records
7 The INPUT verb is used to get a value from the user that is to be tested by
an IF statement. Here it gets verification from the user that this is the
customer to delete.
8 Whatever the user types in as a response to the INPUT verb is
automatically upshifted. Thus we check to see if the response is y or yes. If
so, the customer is deleted. If not, we print a confirmation that nothing
was done.
1 system ex15,base=orders(";");
2 list(auto) customer;
3 level;
4 data(key) cust-no ("enter cust-no to delete");
5 get customer;
6 display;
7 input "delete this customer?";
8 if input = "Y","YES"
9 then delete(current) customer
10 else display "customer not deleted";
11 end;