Navigation: ABC Library Reference > FileManager > FileManager Methods >====== Previous (get previous record in sequence) ====== | |
Previous, PROC
The Previous method gets the previous record in sequence. The Previous method handles any errors that occur while getting the record.
The TryPrevious method provides a slightly different (manual) alternative for getting records in sequence.
Implementation:
If Previous succeeds, it returns Level:Benign (declared in ABERROR.INC). If it ultimately fails, it returns the severity level of the last error it encountered while trying to get the previous record. See Error Class for more information on severity levels.
Return Data Type: BYTE
Example:
PROGRAM
INCLUDE('ABFILE.INC') !declare FileManager class
Access:Client CLASS(FileManager) !derive Access:Client object
END
CODE
!program code
LOOP !loop through client file
CASE Access:Client.Previous() !get previous record in sequence
OF Level:Notify OROF Level:Fatal !if error occurred
POST(Event:CloseWindow) !shut down
BREAK
ELSE !otherwise
PRINT(Rpt:Detail) !print the record
END
END
See Also: TryPrevious