Document Templates : DGL Statements : Control Flow Statements : STOP Statement

STOP Statement

Statement Syntax:

STOP ;

The STOP statement stops execution of the template.

Typically, a specific condition is tested and the template is stopped if this condition has a value for which further processing is meaningless.

For example, in the following statements we check whether the specified system_name is proper. If not, i.e., if an error has been detected, a message is issued to the dialog area and the template is stopped.

md := stm_r_md (system_name, status) ;
IF (status <> stm_success) THEN
WRITE (dialog_area, ’Execution Stopped due to error’) ;
STOP ;
END IF ;