skip to main content

Compiler and Runtime : Compiler : Compiler Directives : PROPAGATE Directive

PROPAGATE Directive
The PROPAGATE directive activates or deactivates propagation of exceptions for CALL statements.
>> PROPAGATE { ON  }
General rules:
1.
ON activates propagation, OFF deactivates it. The default value is OFF.
 
When propagation is OFF, and a CALL statement without the ON EXCEPTION clause fails, an error is shown and execution terminates.
 
When propagation is ON and a CALL statement without the ON EXCEPTION clause fails, the COBOL program terminates and reports the exception to the caller. The Runtime Framework keeps reporting the same exception to the caller until a program without propagation, or a CALL statement with an ON EXCEPTION clause is found.
Example
Propagation will be activated in the following program:
           >>PROPAGATE ON
       program-id. eg001.

Copyright (c) 2017 Veryant
Contact us
Please share your comments on this manual or on any
Veryant product documentation with the email button at the top left