What is Function Routing in LANSA?
|Product/Release:||LANSA for Windows and LANSA for the AS/400|
|Abstract:||Function Routing allows the automatically (re)routing of invocations of a function to another function at execution time without changing a program.|
|Submitted By:||LANSA Technical Support|
Function Routing allows the automatic (re)routing of invocations of a function to another function at execution time without changing programs.
It was developed specifically to allow package providers who supply a standard package to customise parts of the application to exactly match their customers' requirements.
For example, a package may be provided which issues a report. A customer, however, may require a different report layout and/or including/excluding different fields. The original version function (REP001) still exists as shipped, but the modified version (REP001A), which is developed especially for this customer, will automatically be executed instead.
This automatic routing is achieved by a table called the function routing table.
What is the Function Routing Table?
The function routing table is a source file with a simple format:
FFFFFFF,TTTTTTT where FFFFFFF is the original ("from") function
and TTTTTTT is the modified ("to") function.
- The function routing table exists at the partition level and must be in the correct library/directory.
- If editing the function routing table on the PC, it is often advisable to put a carriage return at the end of the last entry in the table. This depends on which editor is being used because some PC editors put in strange characters at the end of the file and the last entry isn't routed correctly.
- Comments start with a * in column 1.
- Use the verify function routing table utility that is supplied with LANSA after updating the function routing table and review all the messages in the relevant output file.
- Check that the type of function and the process being used can be routed. Also check the location of the "from" and "to" functions.
Note: For more information about, and examples of, the function routing table refer to the LANSA Technical Guide Volume