PERFORM BREAK [PROCESSING ] [(r)]
|
AT BREAK statement
|
This document covers the following topics:
For an explanation of the symbols used in the syntax diagram, see Syntax Symbols.
Related Statements: ACCEPT/REJECT | AT BREAK | AT START OF DATA | AT END OF DATA | BACKOUT TRANSACTION | BEFORE BREAK PROCESSING | DELETE | END TRANSACTION | FIND | GET | GET SAME | GET TRANSACTION DATA | HISTOGRAM | LIMIT | PASSW | READ | RETRY | STORE | UPDATE
Belongs to Function Group: Database Access and Update
The PERFORM BREAK PROCESSING
statement is used to establish
break processing in loops created by FOR
, REPEAT
, CALL LOOP
and
CALL FILE
statements
where no automatic break processing is established, or whenever a
user-initiated break processing is desired. Unlike automatic break processing
which is executed immediately after the record is read, the PERFORM BREAK
PROCESSING
statement is executed when it is encountered in the normal
flow of the program.
This statement causes a check for a break processing condition (based on
the value of a control field) and also results in the evaluation of
Natural system functions. This
check and system function evaluation are performed each time the statement is
encountered for execution. This statement may be executed depending on a
condition specified in an IF
statement.
(r) |
Statement Reference Notation:
By default, the final The notation
|
---|---|
AT BREAK statement... |
See the syntax of the |
** Example 'PBPEX1S': PERFORM BREAK PROCESSING (structured mode) ************************************************************************ DEFINE DATA LOCAL 1 #INDEX (N2) 1 #LINE (N2) INIT <1> END-DEFINE * FOR #INDEX 1 TO 18 PERFORM BREAK PROCESSING /* AT BREAK OF #INDEX /1/ WRITE NOTITLE / 'PLEASE COMPLETE LINES 1-9 ABOVE' / RESET INITIAL #LINE END-BREAK /* WRITE NOTITLE '_' (64) '=' #LINE ADD 1 TO #LINE END-FOR * END
________________________________________________________________ #LINE: 1 ________________________________________________________________ #LINE: 2 ________________________________________________________________ #LINE: 3 ________________________________________________________________ #LINE: 4 ________________________________________________________________ #LINE: 5 ________________________________________________________________ #LINE: 6 ________________________________________________________________ #LINE: 7 ________________________________________________________________ #LINE: 8 ________________________________________________________________ #LINE: 9 PLEASE COMPLETE LINES 1-9 ABOVE ________________________________________________________________ #LINE: 1 ________________________________________________________________ #LINE: 2 ________________________________________________________________ #LINE: 3 ________________________________________________________________ #LINE: 4 ________________________________________________________________ #LINE: 5 ________________________________________________________________ #LINE: 6 ________________________________________________________________ #LINE: 7 ________________________________________________________________ #LINE: 8 ________________________________________________________________ #LINE: 9 PLEASE COMPLETE LINES 1-9 ABOVE
Equivalent reporting-mode example: PBPEX1R
.