IBM Natural Question:
What happens when you issue a ESCAPE ROUTINE in a program?
Will there be any compilation /Run time erro?
Answers:
Answer #1Escape Routine is generally used to interupt the processing
of Subprogram or Subroutine to return Control back to the
next statement from where this subprogram or routine was
called.
This statement will return an error if not placed within a
subprogram, subroutine or processing loop.
of Subprogram or Subroutine to return Control back to the
next statement from where this subprogram or routine was
called.
This statement will return an error if not placed within a
subprogram, subroutine or processing loop.
Answer #2When you give escape routine in a program it will not give you any error, it will just come out the program with out any error.
Answer #3You can use the ESCAPE ROUTINE anywhere, if the place you put it is a main routine, the routine will be terminated. If the statement was put in a called routine, the module will be terminated and control will return to the statement after the statement that called that routine
Answer #4No it does not give any error.
ESCAPE ROUTINE works as ESCAPE MODULE, if coded directly in the program(Not inside a subroutine or subprogram) and stops further processing.
This is tested in Natural Version : 8.2.6.9
ESCAPE ROUTINE works as ESCAPE MODULE, if coded directly in the program(Not inside a subroutine or subprogram) and stops further processing.
This is tested in Natural Version : 8.2.6.9