User Tools

Site Tools


next_get_next_element_.htm
Navigation:  ABC Library Reference > ProcessClass > ProcessClass Methods >====== Next (get next element) C6H0009.jpg ====== Previous pageReturn to chapter overviewNext page

Next( **//processRecords //), VIRTUAL**

blk2blue.jpg

Next Gets the next element in the result set.
process records A boolean constant, variable, EQUATE, or expression that tells the ProcessClass object whether to update its progress indicators. A zero (0) value does not update the progress indicators; any other value does update the indicators.

The **Next **method gets the next element in the result set and returns a value indicating its success or failure.

Member of: ProcessClass

Implementation: The Next method calls the ViewManager.Next method. The ProcessClass.Next method updates both the RecordsProcessed property and the Percentile property.
Return Data Type: BYTE

Example:

** ACCEPT**

**  CASE EVENT()**

**  OF Event:OpenWindow**

**   Process.Reset                    !position to first record**

**   IF Process.Next(0)               !get first record**

**    POST(Event:CloseWindow)         !if no records, shut down**

**    CYCLE**

**   END**

**  OF Event:Timer                    !process records with timer**

**   StartOfCycle=Process.RecordsProcessed**

**   LOOP WHILE Process.RecordsProcessed-StartOfCycle<;RecordsPerCycle**

**    CASE Process.Next(1)            !get next record, update indicator**

**    OF Level:Notify                 !if end of file**

**     MESSAGE('Process Completed')   ! tell end user**

**     POST(EVENT:CloseWindow)        ! and shut down**

**     BREAK**

**    OF Level:Fatal                  !if fatal error**

**     POST(EVENT:CloseWindow)        !shut down**

**     BREAK**

**    END**

**   END**

**  END**

** END**

**See Also: **Percentile, RecordsProcessed, ViewManager.Next

next_get_next_element_.htm.txt · Last modified: by 127.0.0.1