Allowed uses: Global, MDX, SQL
*INCLUDE {includedfile}(Param1,Param2,….)
Allows you to include other logic files in the current rules file. If no file name extension is given, .LGF is assumed. Can be used anywhere inside a rules file.
The benefit of using included files instead of multiline functions is that this method permits you to include entire logic sections, containing any type of instructions like *COMMIT, *XDIM_MEMBER, while logic functions can only perform string substitutions on single line statements. On the other hand, functions do not need to be written in separate files.
Parameters
You can pass parameters to the included logic. The parameters are referenced as %P1%, %P2%, and so on.
Example
*INCLUDE MyModule.LGF (REVENUE, COST)
The content of the file MyModule.LGF
could be:
#GROSSPROFIT= [ACCOUNT].[%P1%] – [ACCOUNT].[%P2%]
#GROSSMARGIN= (([ACCOUNT].[%P1%] –
[ACCOUNT].[%P2%])/[ACCOUNT].[%P1%])*100
Note
Similar functionality is available using *SUB procedures. SUB procedures can have user-named parameters, and do not need to be stored in individual external files.