Previous Topic: SORT Control StatementNext Topic: TITLE Control Statement


STOP Control Statement

The STOP control statement signals the end of a processing phase and the start of the next processing phase, if applicable. The processing phases (in order) are:

  1. Non-sort logic or logic before the sorting (statements preceding the SORT control statement)
  2. End-of-data logic (ON control statement) for non-sort or pre-sort logic
  3. Post-sort logic (statements following the SORT control statement)
  4. End-of-data logic (ON control statement) for post-sort logic

The pre-sort and post-sort designations are not applicable if sorting is not requested (no SORT control statement).

Syntax

STOP

Example

The following example concludes processing when the first digit of JOB is greater than or equal to "B":

/IF SUBSTR(JOBNAME,1,1) GE 'B'
/         STOP
/END
/PRINT JOBNAME