Output not displaying after 'WRITE' command
I have to display messages in a program. The problem is that after the 'Write' command there is more data processing. Once the write statement is encountered I want the program to display the messages and not go ahead with further processing. I tried using leave program, leave to screen 0 and leave list-processing but all these do not take me to the output screen.
Can someone please help me with this.
Vinitha Raj replied
You can try with statement MESSAGE with type I instead of WRITE if you want to populate the messages. After message statement do not write LEAVE TO LIST-PROCESSING. This will continue further processing of code.
Or else you can put a flag after the WRITE statement. After the statement check the flag to decide whether to proceed processing or not.
WRITE 'HELLO'. FLAG = 'X'. CHECK FLAG is INTIAL.