The mechanism that controls program flow transfers control from statement to statement in the sequence in which they were written in the source program unless an explicit transfer of control overrides this sequence or there is no next executable statement to which control can be passed.The transfer of control from statement to statement occurs without the writing of an explicit Procedure Division statement, and, therefore, is an implicit transfer of control.
RM/COBOL provides both explicit and implicit means of altering the implicit control transfer mechanism.
In addition to the implicit transfer of control between consecutive statements, implicit transfer of control also occurs when the normal flow is altered without the execution of a procedure branching statement.
RM/COBOL provides the following types of implicit control flow alterations that override the statement-to-statement transfers of control:
An explicit transfer of control consists of an alteration of the implicit control transfer mechanism by the execution of a procedure branching or conditional statement.An explicit transfer of control can be caused only by the execution of a procedure branching or conditional statement.The execution of the procedure branching ALTER statement does not in itself constitute an explicit transfer of control, but affects the explicit transfer of control that occurs when the associated GO TO statement is executed.The procedure branching statement EXIT PROGRAM causes an explicit transfer of control only when the statement is executed in a called program.
The term “next executable statement” refers to the next statement to which control is transferred according to the rules above and the rules associated with each language element in the Procedure Division.
There is no next executable statement following:
There is also no next executable statement when the program contains no Procedure Division.
When there is no next executable statement and control is not transferred outside the program, the program flow of control is undefined unless the program execution is in the nondeclarative portion of a program under control of a CALL statement, in which case an implicit EXIT PROGRAM statement is executed.
COBOL Related Interview Questions
|VSAM Interview Questions||IBM - VSAM Interview Questions|
|IBM-CICS Interview Questions||JCL Interview Questions|
|IBM DB2 Interview Questions||IBM-JCL Interview Questions|
|DB2 Using SQL Interview Questions||IBM-JCL&VSAM Interview Questions|
|IBM Mainframe Interview Questions||COBOL, CICS, JCL, VSAM, DB2 Interview Questions|
|DB2 SQL Programming Interview Questions||IMS/DB Interview Questions|
|Mainframe DB2 Interview Questions|
Procedure Division Statements
All rights reserved © 2018 Wisdom IT Services India Pvt. Ltd
Wisdomjobs.com is one of the best job search sites in India.