Skip to content

TERMINATE

FUNCTION

This command ends the script, loop or procedure.

SYNTAX

TERMINATE [PROCEDURE | LOOP]

NOTES

  • The TERMINATE command does the following:

    1. Closes all links opened in the script, except in an overlay script.
    2. Exits the script. Primary and continuation scripts return to the Dictionary-IV menu. Public or overlay scripts return control to the scripts that invoked them.
  • The TERMINATE LOOP command does the following:

    Passes control to the command that follows the ENDLOOP command. TERMINATE LOOP is only valid in a DO LOOP command.

  • The TERMINATE PROCEDURE command does the following:

    Returns control to the exit point of the current procedure. When used in a DO LOOP command, the current iteration of the loop is terminated and the controlling condition of the loop is evaluated.

EXAMPLES

IF 4SCUST.CUST-CODE = " " THEN
LET INPUT-FLAG = "N"
TERMINATE PROCEDURE
ENDIF

SEE ALSO

DO, EXIT-OPTION, BREAK, CONTINUE

From the Script-IV Language Reference, version 8.9.1. Open this page in the PDF