Suspend and Terminate

LANSA Composer

Suspend and Terminate

The Suspend and Terminate Processing Directives terminate the Processing Sequence.  Suspend terminates the Processing Sequence with an error ('ER') condition, such that it can subsequently be restarted.  The Terminate directive terminates the Processing Sequence with the specified result code (but, in any event, the Processing Sequence cannot be restarted).  Either directive would typically be used subject to a condition specified on the directive itself or in an enclosing conditional block such as Case, Otherwise, If, Elseif or Else.

You can specify the following details for Suspend and Terminate Directives:

Condition

Optional.  The directives are unconditional if no condition is specified.  Alternatively you can specify a condition that must be satisfied for the Directive to be effective. Refer to Conditioning Expressions for information about the syntax of conditioning expressions.

Result code

(Applies to Terminate directive only)  Specifies the result code with which the Processing Sequence will end.  Select 'OK' if the Processing Sequence should end normally or 'Errors' if the Processing Sequence should end with an error ('ER') condition.

Message Text

Optional.  You may specify message text that will appear in the Processing Sequence log if/when the Suspend or Terminate item is executed.  You may specify a short message and/or extended (detailed) message text.

Perform variable substitution?

If this box is checked, then the message text specified in the preceding fields may contain embedded references to processing sequence variables and/or built-in variables which will be replaced at run-time with the corresponding variable values.

For example, if you specify the string "&MYCOUNT files processed from &MYFOLDER(&MYINDEX) at *now_local", the variable and built-in variable references &MYCOUNT, &MYFOLDER(&MYINDEX) and *now_local will be replaced by the values of the variables that they represent.

In most cases, a reference to a processing sequence variable or built-invariable must be followed by a space (or certain special characters or the end of the string) in order for the reference to be correctly identified and substituted.

If two ampersands (&&) or two asterisks (**) appear together in the string, they are reduced to a single ampersand or asterisk and not considered for substitution.