In Mainframe COBOL, how can I send a message to the console operator, wait for a response, and then continue?

I have a very long COBOL program that runs randomly at different times during the day. The console operator wants to be notified when it starts, and ask the program to wait so they can go to coffee before allowing work to continue. How to do it with COBOL?

+4
source share
1 answer

Use the COBOL 'STOP' statement, for example:

 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.                             
+5
source

Source: https://habr.com/ru/post/1672513/


All Articles