Previous Topic Next topic Print topic


STOP

Purpose

Raises the FINISH condition, closes all open files, and ends program execution.

Syntax

STOP;

Description

The STOP statement raises the FINISH condition, closes all open files, and ends program execution.

A RETURN from a main procedure (declared with OPTIONS(MAIN)) has the same effect as STOP.

Example

CLOSE:   
   PROCEDURE;

   IF CLOSEDATE(FILE_NO) = 0
      THEN CALL ERROR(7);
      .
      .
      .
   STOP;
END CLOSE;

Restrictions

None.

Previous Topic Next topic Print topic