I have a very long running COBOL program that runs randomly at various times during the day. The Console operator wants to be notified when it starts up and have the program wait so they can go get coffee before letting the job go ahead. How can I do this with COBOL?
Use the COBOL 'STOP' statement, like this:
IDENTIFICATION DIVISION.
PROGRAM-ID. SAMPLE.
PROCEDURE DIVISION.
STOP 'GO GET COFFEE'
* program waits until operator responds
DISPLAY 'PROGRAM WILL NOW CONTINUE'
* program now continues
* [...]
GOBACK.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With