skip to main content

Procedure Division Statements : STOP

STOP
General Format
Format 1
STOP RUN [ {RETURNING} {identifier-1} ] 
           {GIVING   } {literal-1   }
Format 2
STOP Literal-1
Format 3
STOP THREAD [thread-handle]
Syntax rules
Formats 1 and 2
1.
2.
3.
Format 3
4.
General rules
Format 1
1.
2.
Format 2
3.
Format 3
4.
5.
6.
Examples
Format 1 - Exit the program and terminate the run unit
stop run
Format 2 - Pass the execution to the graphical debugger
stop 123
Format 3 - Stop a display counter thread
 working-storage section.
 77 thandle  usage handle of thread.
 77 counter   pic 9(9).
 procedure division.
  perform thread display-counter handle thandle
  perform increase-counter
  stop thread thandle
  display message "done!"
  goback
  perform until 1 = 0
    display counter
  end-perform.
  perform 99900000 times
    add 1 to counter
  end-perform.

Copyright (c) 2017 Veryant
Contact us
Please share your comments on this manual or on any
Veryant product documentation with the email button at the top left