CHECK

CHECK - Within loops

Effect

CHECK evaluates the subsequent logical expression. If it is true, the processing continues with the next statement.

In loop structures like

 DO	 ... ENDDO 
 WHILE  ... ENDWHILE 
 LOOP   ... ENDLOOP 
 SELECT ... ENDSELECT


CHECK with a negative outcome terminates the current loop pass and goes back to the beginning of the loop to start the next pass, if there is one.

In structures like

 FORM	 ...  ENDFORM 
 FUNCTION ...  ENDFUNCTION 
 MODULE   ...  ENDMODULE 
 AT events 
 GET events


CHECK with a negative outcome terminates the routine or modularization unit.

If CHECK is neither in a loop nor a routine nor a modularization unit, a negative logical expression terminates the current event. In contrast, the statement REJECT terminates the current event, even from loops or subroutines.

Note

If a CHECK produces a negative result in a GET event, the GET events in subordinate tables of the logical database are not processed either.

Related

CONTINUE, EXIT, REJECT, STOP