Page History
...
Code Block |
---|
declare function Set_FSError open "CUSTOMERS" To CUSTOMERS_TABLE else status = Set_FSError() return 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 "CUSTOMERS" By "STATE" 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 CUSTOMERS_TABLE, @ID else status = Set_FSError() return end * processing logic here ... GoSub PROCESS Repeat return 0 PROCESS: /* process the row */ return |
...