Note: Built-In Function Rules Usage Options
Nominates a function as a "message collector".
No Argument Values.
No Return Values
- This Built-In Function allows a function to nominate itself as a "message collector". This means that most messages that it causes to be subsequently issued (from functions that it calls, I/O modules it invokes, or triggers it fires) will be routed directly to it. Normally they would be routed up the invocation stack as each object involved completes execution.
- This Built-In Function is a definition function. Its presence anywhere in a function causes the function to be added to the collector stack at entry, and removed at termination.
Because the MESSAGE_COLLECTOR Built-In Function is a definition function, not an executable function, you cannot make code like this work:
if ( ....... )
This code will become a message collector regardless of the IF condition.
- Normally a USE MESSAGE_COLLECTOR command would immediately follow a FUNCTION command at the beginning of the function.
- This Built-In Function has been designed to be used in interactive functions and batch functions that are "sitting at the top" of a very complex and "deep" series of function calls and triggers. It is not usually required in mainstream applications.
- This Built-In Function has been designed to speed up this special type of application, not to alter its processing logic or architecture in any way.
- Do not under any circumstances whatsoever design applications that use the MESSAGE_COLLECTOR Built-In Function to affect the way that the application works. In other words, the application should be functionally identical regardless of whether this Built-In Function is used or not. MESSAGE_COLLECTOR must only be used to speed up message routing - not to implement any other form of logic or architecture that relies on its existence to work correctly.
While it is thought that designers could not use MESSAGE_COLLECTOR to change processing in any way, it is better that this important point is noted. The message routing logic used by Visual LANSA is much more efficient that the IBM i message routing architecture, and has no need of this special option to speed it up.
- Up to 10 message collectors may be stacked.