Section 14.3: Paused Screen Handling Up Chapter 14: Extensions Section 14.5: ODBC Data access 

14.4 TODO statement

Mike Aubury has introduced a new statement TODO ... END TODO similar in structure to a CASE ... END CASE but which iterates until all its WHEN branches are DONE.
TODO  [condition]
   WHEN condition  
     statements ...  
   IF cond THEN
     DONE
   END IF
   ...
   [ ALWAYS statements ... ]
END TODO
The idea is that each WHEN must be marked DONE before the loop exits. There is an optional conditional at the top of the loop which can also force a premature exit, along with EXIT TODO and/or CONTINUE TODO. The idea is to have a list of workflow and batch type operations - which can be performed in any order - but all must be performed before we can proceed. Each item is only executed when the WHEN condition is met - but the DONEs must still be executed (ie. at some point - the WHEN condition must evaluate to TRUE and the commands executed, resulting in a DONE)
There is also an ALWAYS item which shouldn’t/can’t be marked DONE but is executed each time around the loop (maybe for a SLEEP, or a DISPLAY etc.)
Eventually, Mike might look to see if each of these WHENs can get executed on a separate thread - so it would be useful for writing parallel executing code.
 Section 14.3: Paused Screen Handling Up Chapter 14: Extensions Section 14.5: ODBC Data access