Page History
...
Code Block |
---|
/* The program processes each record in the CUSTOMER file. After calling the external program RECORD_STATS, the program restores the values of @RECORD and @ID by transferring them from temporary variables. The local subroutine FURTHER_PROCESSING is not shown. */ Open "TEST" To CUSTOMER_TABLE Else status = Set_FSError() Return End Select CUSTOMER_TABLE Done = 0 Loop ReadNext @ID Else Done = 1 Until Done Read @RECORD From CUSTOMER_TABLE, @ID Then * save contents before calling routine * in case RECORD_STATS changes values SAVE_RECORD = @RECORD SAVE_ID = @ID Call RECORD_STATS * restore contents Transfer SAVE_RECORD To @RECORD Transfer SAVE_ID To @ID GoSub Further_Processing End Repeat |