3.2.1 Mapping a File's Library to a Fixed Deployed Schema

Important – When developing an application which includes LANSA files it is important to plan a strategy for managing files updates BEFORE you install the first version of the application.

By default, LANSA files are compiled into the partition's Default File Library.  When the files are deployed they will, as the default, be created in the database with a schema name the same as the deploying partition's Default File Library.  Consequently, if the development environment is moved to another partition with a different Default File Library between Version releases the deployed files will end up in two different schemas (if you use the default processing).

Using the scenario 3.2 Lifecycle of an Application:

How should an application be deployed to a consistent schema?

1.  Decide what the schema you want to use in the deployed application.  This does not have to correspond to a library name in the build environment e.g. LANSALIB

2.  Create the first version of the application and include the required files. Create a Library Substitution corresponding to the library name selected to be used for the application e.g. LANSALIB.

3.  Select this substitution to be used for the files. Refer to Configure the File Library Substitution for more information.

4.  Modify the application code to apply the appropriate overrides using the DEFINE_OVERRIDE_FILE Built In Function. This is required to direct the deployed OAM, which has embedded in it the LANSA Library of when the OAM was generated, to the appropriate runtime library (schema).  Refer to DEFINE_OVERRIDE_FILE in the Technical Reference Guide for more information.