Show TOC

Syntax documentation*USE Locate this document in the navigation structure

Allowed uses: By Commit, MDX, SQL

*USE {usefile}(Param1,Param2,...)

The USE instruction behaves like the *INCLUDE instruction, but only the members that are needed by the calling logic are included. This generates smaller, faster to execute LGX files.

The instruction *USE must be called again after each *COMMIT instruction. This rule does not apply to *INCLUDE files.

Files included with the *USE keyword take the same default path and extension of the included files.

All special instructions (such as *COMMIT and other instructions) are ignored, if found in a “used” file. We can say that when a rules file is “used” by another file, the only thing the calling file is interested in is the list of calculated members the “used” file contains. This restriction does not apply to “included” files.

All temporary accounts contained in used files should always be named with a leading exclamation mark, even if this is not technically required. They could also begin with a pound sign (#), but, in this case, the rules module tries to write their resulting values in the application.

Example Example

*USE TranslationMembersFile

[account].[#cost] = -([currency].[lc],[account].[grosssales])/[account].[!End]

[account].[#revenue] = -([currency].[lc],[account].[cost])/[account].[!Avg_End]

'------------------------------------------------------------

End of the example.

The file TranslationMembersFile may contain the definitions of many accounts, but only those for [account].[!End] and [account].[!Avg_End] is included in the calling logic.