Page History
...
Code Block |
---|
/* The row having key 101 is read into the variable CUST as a dynamic array. */ open "CUSTOMER" To CUSTOMER_TABLE then read CUST From CUSTOMER_TABLE, "101" else status = Set_FSError() return end end /* Select...By initializes a Cursor with a sorted list of customer records. A ReadNext and Read loop reads each record in turn, passing the customer records to a local subroutine (not shown) for processing. Note the use of the Cursor keyword and the Cursorvar. */ CURSOR_NO = "" Select CUSTOMER_TABLE By "ST" Setting CURSOR_NO Else status = Set_FSError() Return end Done = 0 loop ReadNext @ID Using CURSOR_NO else Done = 1 Until Done Do read @RECORD From CUSTOMER_TABLE, @ID then status = Set_FSError() return end * processing logic here ... GoSub PROCESS Repeat |