What will happen if we give GOBACK statement instead of STOPRUN in a program which does not call any other program?

Showing Answers 1 - 13 of 13 Answers

Balaji

  • Dec 14th, 2006
 

Stop run: Terminates the execution of the program and return back to the OS

GOBACK: Terminates the execution of the program and return back to the previous higher level.

If you give goback instead of stoprun in a standalone program nothing will happen. goback is going to return back to the OS since that is the higher level for the program.

Sodadasi

  • Dec 21st, 2006
 

The program will go in an infinite loop even if you code in Called or calling program. Goback gives the control from the begining of the program

  Was this answer useful?  Yes

Pradeep Bhatt

  • Jan 30th, 2007
 

It will return to calling program. In a threaded environment, if the program is the first program in a thread, the thread is terminated.

  Was this answer useful?  Yes

Stephen

  • Jul 28th, 2011
 

It will abend with the below message " The flow of control in program TRIAL proceeded beyond the last line of the program."

  Was this answer useful?  Yes

Give your answer:

If you think the above answer is not correct, Please select a reason and add your answer below.

 

Related Answered Questions

 

Related Open Questions