REJECT

Short Reference

Syntax

REJECT [node].

Addition:

... node

Effect

The REJECT statement exits the current GET event block of an executable program. If you do not specify node, the runtime environment responds as described in Exiting Processing Blocks.

The REJECT statement always refers to the current GET event, not to the location where it is executed. If you call a procedure in a GET event block, and the REJECT statement is executed there, the calling event block is affected.

Note

You cannot use REJECT in methods. We do not recommend using REJECT in processing blocks other than GET event blocks, either. Runtime errors can occur if the processing blocks are not executed in the correct context.

Addition

... node

Effect

You can specify node as a flat, character-type data object. When the statement is executed, node must contain the name of a node that lies above the current node in the logical database hierarchy. If you specify node, the logical database reads the next data record of the corresponding node.

Example

Exit event block GET sbook and branch to event GET sflight after interface work area sbook is output for the first time.

NODES: sflight, sbook.
GET sflight.
  SKIP.
  WRITE: / 'Carrid:', sflight-carrid,
           'Connid:', sflight-connid,
           'Fldate:', sflight-fldate.
  ULINE.
GET sbook.
  WRITE: / 'Bookid:', sbook-bookid.
  REJECT 'SFLIGHT'.

Exceptions

Non-Catchable Exceptions