| **Navigation:**  [[abc library reference.htm|ABC Library Reference]] > FileManager > FileManager Methods >====== TryNext (try to get next record in sequence) {{c6h0009.jpg|C6H0009.jpg}} ====== | [[tryinsert try to add a new record .htm|{{btn_prev_n.gif|Previous page}}]][[abc library reference.htm|{{btn_home_n.gif|Return to chapter overview}}]][[tryopen try to open the file .htm|{{btn_next_n.gif|Next page}}]] | | || **TryNext, PROC** {{blk2blue.jpg|blk2blue.jpg}} The **TryNext **method gets the next record in sequence. The TryNext method does not attempt to handle errors that occur while getting the next record. The Next method provides a slightly different (automatic) alternative for getting records in sequence. **Implementation:** TryNext tries to get the next record. If it succeeds, it returns Level:Benign (declared in ABERROR.INC). If it fails, it returns the severity level of the error it encountered while trying to get the record. See //Error Class// for more information on severity levels. **Return Data Type:**     BYTE **Example:** **PROGRAM  BatchReport               !batch process--don't display errors** ** INCLUDE('ABFILE.INC')             !declare FileManager class** ** MAP                               !program map** ** END** **GlobalErrors ErrorClass            !declare GlobalErrors object** **Access:Client CLASS(FileManager)   !derive Access:Client object** **       END** ** CODE** ** !program code** ** LOOP                              !loop through client file** **  CASE Access:Cliet.TryNext()      !get next 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:**     [[next get next record in sequence .htm|Next]] , [[next read next record in sequence .htm|NEXT]], [[get read a record or entry .htm|GET]]