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:
Version 1.0.0 the LANSA files compiled in partition BLD will have the partition Default File Library, say BLDDTALIB, embedded in the generated OAM.
Version 2.0.0 is released from a different partition BL2 in the same LANSA system. When the files are rebuilt in this partition the partition Default File Library, say BL2DTALIB, will now be the library embedded in the OAM.
Version 3.0.0 is released from a new LANSA system and yet another partition ABC. When the files are rebuilt in this partition the partition Default File Library, say ABCDTALIB, will now be the library embedded in the OAM.
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.