Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

[ Image Removed |../../index.htm#lansa/ladugubh_0020.htm]
You are here:

...

LANSA's Permanent File Overrides facility allows you to specify that when a specific file is used, LANSA is to always use a different one. This override facility can be used for files with 10 character file names or files with a "." in their name as shown in the Examples.
The Permanent File Overrides facility is activated by specifying Y in the Allow permanent file overrides option of the System Settings Work with Execution and Security Settings. (This option inserts the string "*PERMFILOVR" into LANSA data area DC@OSVEROP.)
First you need to create a source physical file called PERMFILOVR using this command:.
    CRTSRCPF PERMFILOVR
You can create this anywhere. LANSA looks for this file in the *LIBL at run-time. If the file is found, LANSA reads the first member to find file override information. To make this override information partition specific, put this file into the partition data or module libraries.
You can edit file PERMFILOVR using SEU (STRSEU) or edit file (EDTF).

...

             CALL M@PEROVR X'00'
     The Hex 0 parameter tells M@PEROVR to do nothing but load and stay active in memory. For LANSA Open and LANSA Client, this call can be put into a program called LCXP9000. You create this program, which LANSA knows is a "User Exit" program, that must be called when LANSA Client and LANSA Open start. If LCXP9000 does not exist, LANSA traps the error on the call and LANSA Open or LANSA Client will continue normally.

Anchor
permfilovr_examples
permfilovr_examples
Examples
Override files with a 10 character name (FILE10NAME)
Override files with a "." in the name (FIL.X)
Anchor
permfilovr_example1
permfilovr_example1
Override files with a 10 character name (FILE10NAME)
1.  Create a special library for dummy files. This library will just be used for file definitions (no data). In this example, the library is called DUMMYLIB.
2.  Use CRTDUPOBJ to copy FILE10NAME to DUMMYLIB. Also copy the logicals attached to FILE10NAME into DUMMYLIB (FILE10NAM1 and FILE10NAM2). As you only need the file definitions, you do not need to copy the data.
3.  Use DSPDBR to make sure that logicals FILE10NAM1 and FILE10NAM2 in DUMMYLIB are attached to file FILE10NAME in DUMMYLIB. This is important for when the file is loaded into LANSA. (Remember that your file & library names must be in upper case.)
4.  Rename FILE10NAME in DUMMYLIB and its logicals so that the files can be loaded into LANSA.
     In this example FILE10NAME becomes FILE10NA                     FILE10NAM1 becomes FILE10N1                     FILE10NAM2 becomes FILE10N2
     It is important to rename the files after they have been copied to DUMMYLIB. If the physical file does not have the same name as the one in the original library then the logicals will not attach to it when they are copied. They would remain attached to the original file.
5.  The files can now be loaded into LANSA.

...

  • Change LANSA's database file attributes for the file so that the I/O module will be put into the partition module library. This alternative is only valid if the partition's module library is not DUMMYLIB.
  • Copy the I/O module to another library which will be in the*LIBL at run-time. Use this alternative only if you remember to do this every time you re-compile the I/O module.

...