Introduction MTB Statements File System Compiler Applications Reference Guide Index

Language Structure Data Division I/O Format Division Procedure Division Mnemonics

MESSAGESUB statement

Syntax: MESSAGESUB statement-label
Discussion: The MESSAGESUB statement sets a branch-to address for the current program. If this program is interrupted while running (via an INTERRUPT statement from another program), program flow will be transferred to the statement-label specified in the MESSAGESUB statement.

When a RETURN statement is executed after the MESSAGESUB path has been taken, program flow continues at the statement immediately following the statement where the INTERRUPT occurred.

Example:
MESSAGESUB 9999        ! Set MESSAGESUB label
.
.
.
9999   MESSAGESUB 9999 ! Reset MESSAGESUB label
       RETURN