Re: pattern for an error



i already tried but "exit program" does no exit

for example

gogogo.
display "hi"
perform error_occurs
display "hi after error"

.

error_occurs
exit program
.


i come back to the second display "hi after error" so the "EXIT
PROGRAM" does not realy that what it sould right???
.



Relevant Pages

  • About your example...
    ... given COBOL program. ... PROCEDURE DIVISION. ... DISPLAY "B". ... EXIT PROGRAM. ...
    (comp.lang.cobol)
  • Re: pattern for an error
    ... You should only return from the PERFORM of a routine with an EXIT PROGRAM, ... the executing program is a MAIN program. ... you might want to replace EXIT PROGRAM with GOBACK. ... If you STILL get to the DISPLAY, then there must be something going on that you ...
    (comp.lang.cobol)
  • Re: COBOL Perform?
    ... I expected the EXIT PROGRAM to terminate the program at the end of the mainline, but it seems to fall through and go execute the paragraphs below it. ... PERFORM UNTIL WS-EOF-FLAG = 'Y' DISPLAY ' TEXT FROM PERFORM UNTIL' ... DISPLAY ' TEXT FROM PERFORM WRITE-TEXT1' ... DISPLAY ' TEXT FROM PERFORM WRITE-TEXT2' ...
    (comp.os.vms)